[FFmpeg-devel] [PATCH 1/5] avformat/argo_brp: Check block align before use

Michael Niedermayer michael at niedermayer.cc
Fri Oct 30 23:52:02 EET 2020


Fixes: division by 0
Fixes: 26667/clusterfuzz-testcase-minimized-ffmpeg_dem_ARGO_BRP_fuzzer-5645146928185344.fuzz

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

diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c
index 48e0cd6aa4..7c679e944c 100644
--- a/libavformat/argo_brp.c
+++ b/libavformat/argo_brp.c
@@ -390,7 +390,7 @@ static int argo_brp_read_packet(AVFormatContext *s, AVPacket *pkt)
 
         blk.size -= ASF_CHUNK_HEADER_SIZE;
 
-        if (blk.size % st->codecpar->block_align != 0)
+        if (st->codecpar->block_align && blk.size % st->codecpar->block_align != 0)
             return AVERROR_INVALIDDATA;
     }
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list