Fix for array out of bound in parse drc instruction func
target_channel_count read from bit stream is being used as index without bound check. Hence the check has been added. Bug:142693847 Test: poc in bug Change-Id: I9d6c832e75b9cb78fe4989516d13707f1ecf7f91
This commit is contained in:
parent
0e6ba25314
commit
09fd1c3c1f
1 changed files with 2 additions and 0 deletions
|
|
@ -773,6 +773,8 @@ impd_parse_dwnmix_instructions(
|
|||
|
||||
dwnmix_instructions->downmix_id = (temp >> 16) & 0x7f;
|
||||
dwnmix_instructions->target_channel_count = (temp >> 9) & 0x7f;
|
||||
if (dwnmix_instructions->target_channel_count > MAX_CHANNEL_COUNT)
|
||||
return (UNEXPECTED_ERROR);
|
||||
dwnmix_instructions->target_layout = (temp >> 1) & 0xff;
|
||||
dwnmix_instructions->downmix_coefficients_present = temp & 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue