summaryrefslogtreecommitdiffstats
path: root/hal/audio_hw.c
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2018-09-07 11:25:33 -0700
committerAndy Hung <hunga@google.com>2018-09-07 11:29:39 -0700
commit64fdb45bc6c4cbde30017ee3b04a78d122fb01a0 (patch)
treeee772db7f95fa6ba9f31686a07f3d156766c5a1e /hal/audio_hw.c
parent92fef5a2bc5bed0c0bb2846a270d02dd8de070ac (diff)
downloadandroid_hardware_qcom_audio-64fdb45bc6c4cbde30017ee3b04a78d122fb01a0.tar.gz
android_hardware_qcom_audio-64fdb45bc6c4cbde30017ee3b04a78d122fb01a0.tar.bz2
android_hardware_qcom_audio-64fdb45bc6c4cbde30017ee3b04a78d122fb01a0.zip
Fix stream_get_parameter_channels from overflowing on 8 ch
Test: Connect 8ch USB and no HAL audio service crash. Bug: 114100789 Change-Id: I93c78cea1da45c8f0813aedc121ce346aa2044f6
Diffstat (limited to 'hal/audio_hw.c')
-rw-r--r--hal/audio_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 440d8101..06376861 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2701,7 +2701,7 @@ static bool stream_get_parameter_channels(struct str_parms *query,
struct str_parms *reply,
audio_channel_mask_t *supported_channel_masks) {
int ret = -1;
- char value[256];
+ char value[ARRAY_SIZE(channels_name_to_enum_table) * 32 /* max channel name size */];
bool first = true;
size_t i, j;