mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-19 21:36:54 +00:00
avcodec/aptx: Check the number of channels
Fixes: store to null pointer of type 'uint32_t' (aka 'unsigned int')
Fixes: 18021/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_HD_fuzzer-5761738313564160
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 98a257c323
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5cf9d6c586
commit
59a2b67c79
@ -989,6 +989,9 @@ static av_cold int aptx_init(AVCodecContext *avctx)
|
||||
AptXContext *s = avctx->priv_data;
|
||||
int chan, subband;
|
||||
|
||||
if (avctx->channels != 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
s->hd = avctx->codec->id == AV_CODEC_ID_APTX_HD;
|
||||
s->block_size = s->hd ? 6 : 4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user