[FFmpeg-devel] [PATCH 3/4] avcodec/sbcdec: Initilaize nubmer of channels
Michael Niedermayer
michael at niedermayer.cc
Wed Sep 25 13:01:19 EEST 2019
Fixes: out of array access
Fixes: 17609/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SBC_fuzzer-5758729319874560
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/sbcdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/sbcdec.c b/libavcodec/sbcdec.c
index 546b38c106..937946e2d2 100644
--- a/libavcodec/sbcdec.c
+++ b/libavcodec/sbcdec.c
@@ -348,6 +348,7 @@ static int sbc_decode_frame(AVCodecContext *avctx,
if (frame_length <= 0)
return frame_length;
+ avctx->channels =
frame->channels = sbc->frame.channels;
frame->format = AV_SAMPLE_FMT_S16P;
frame->nb_samples = sbc->frame.blocks * sbc->frame.subbands;
--
2.23.0
More information about the ffmpeg-devel
mailing list