Skip to content

Commit

Permalink
Avoid a failed assert on invalid channel indices
Browse files Browse the repository at this point in the history
Fixes: 14914/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-6288430994030592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
  • Loading branch information
mstorsjo committed Oct 8, 2019
1 parent 4fe5edb commit e90ed2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libPCMutils/src/pcmdmx_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,9 @@ static PCMDMX_ERROR getChannelMode(
(channelType[ch] & 0x0F) - 1,
0); /* Assign all undefined channels (ACT_NONE) to front channels. */

if (channelIndices[ch] >= numCh[channelType[ch] >> 4][chGrp])
return PCMDMX_INVALID_CH_CONFIG;

spkrPos[ch] = getSpeakerPos(channelType[ch], channelIndices[ch],
numCh[channelType[ch] >> 4][chGrp]);

Expand Down

0 comments on commit e90ed2c

Please sign in to comment.