diff mbox series

[FFmpeg-devel,03/11] avcodec/aac/aacdec: Check if frame is allocated in frame_configure_elements()

Message ID 20240630231306.3779027-3-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,01/11] MAINTAINERS: Add Timo Rothenpieler to server admins | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer June 30, 2024, 11:12 p.m. UTC
I did not investigate exactly why frame is NULL, happy to provide the sample
if someone wants to investigate further

Fixes: NULL pointer dereference
Fixes: 69893/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-4965255361396736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
 libavcodec/aac/aacdec.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series


diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index ea2ba84a80c..6a70c69034c 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -186,6 +186,9 @@  static int frame_configure_elements(AVCodecContext *avctx)
+    if (!ac->frame)
+        return AVERROR_INVALIDDATA;
     /* get output buffer */
     if (!avctx->ch_layout.nb_channels)