diff mbox series

[FFmpeg-devel,6/8] avformat/aaxdec: Check string before strcmp()

Message ID 20201023183940.31485-6-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/8] avcodec/magicyuv: Check slice size before reading flags and pred
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Michael Niedermayer Oct. 23, 2020, 6:39 p.m. UTC
Fixes: NULL ptr dereference
Fixes: 26508/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5694725249826816

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

Patch

diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c
index 3db6e9bc6d..7d10e805ca 100644
--- a/libavformat/aaxdec.c
+++ b/libavformat/aaxdec.c
@@ -232,7 +232,7 @@  static int aax_read_header(AVFormatContext *s)
         int64_t col_offset;
         int flag, type;
 
-        if (strcmp(a->xcolumns[c].name, "data"))
+        if (!a->xcolumns[c].name || strcmp(a->xcolumns[c].name, "data"))
             continue;
 
         type = a->xcolumns[c].type;