[FFmpeg-cvslog] avcodec/aptx: Check the number of channels

Michael Niedermayer git at videolan.org
Fri Nov 1 21:32:20 EET 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Oct  9 09:53:26 2019 +0200| [98a257c3235bdc18151534134148845728418248] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98a257c3235bdc18151534134148845728418248
---

 libavcodec/aptx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/aptx.c b/libavcodec/aptx.c
index e3fb064a6d..a2620a9212 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;
 



More information about the ffmpeg-cvslog mailing list