[FFmpeg-devel] [PATCH 03/11] avcodec/aac/aacdec: Check if frame is allocated in frame_configure_elements()
    Michael Niedermayer 
    michael at niedermayer.cc
       
    Mon Jul  1 02:12:42 EEST 2024
    
    
  
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 at niedermayer.cc>
---
 libavcodec/aac/aacdec.c | 3 +++
 1 file changed, 3 insertions(+)
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 */
     av_frame_unref(ac->frame);
     if (!avctx->ch_layout.nb_channels)
-- 
2.45.2
    
    
More information about the ffmpeg-devel
mailing list