avcodec/wmaprodec: Check if the channel sum of all internal contexts match the external
Fixes: NULL pointer dereference
Fixes: 18689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5715114640015360
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 090ac57997)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
53a03d98bd
commit
745040d269
1 changed files with 2 additions and 0 deletions
|
|
@ -1899,6 +1899,8 @@ static av_cold int xma_decode_init(AVCodecContext *avctx)
|
|||
s->start_channel[i] = start_channels;
|
||||
start_channels += s->xma[i].nb_channels;
|
||||
}
|
||||
if (start_channels != avctx->channels)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue