summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-10-09 09:53:26 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-01 20:15:32 +0100
commit98a257c3235bdc18151534134148845728418248 (patch)
treecee4f8187a44ea807c686370400769b0ba65cea8 /libavcodec
parent47a017aaaae39bd8dc487fb1d87c41994dcbb74b (diff)
downloadffmpeg-streaming-98a257c3235bdc18151534134148845728418248.zip
ffmpeg-streaming-98a257c3235bdc18151534134148845728418248.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aptx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aptx.c b/libavcodec/aptx.c
index e3fb064..a2620a9 100644
--- a/libavcodec/aptx.c
+++ b/libavcodec/aptx.c
@@ -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;
OpenPOWER on IntegriCloud