summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2020-11-02 21:57:19 +1000
committerZane van Iperen <zane@zanevaniperen.com>2020-11-03 10:47:37 +1000
commit5fb628521faaf36cc284618db099d78c107ac6b5 (patch)
treeaeb7e3bea7312050f820401142f8b1ccf181e440
parentbbba41704b854492f6b4c06e9cedeb611d6ff537 (diff)
downloadffmpeg-5fb628521faaf36cc284618db099d78c107ac6b5.tar.gz
avformat/argo_brp: bail if no video frames
Fixes: Assertion failure Fixes: 26572/clusterfuzz-testcase-minimized-ffmpeg_dem_ARGO_BRP_fuzzer-5166735591997440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
-rw-r--r--libavformat/argo_brp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c
index fdc552af14..766d4fd261 100644
--- a/libavformat/argo_brp.c
+++ b/libavformat/argo_brp.c
@@ -218,6 +218,9 @@ static int argo_brp_read_header(AVFormatContext *s)
bvid->height = AV_RL32(buf + 8);
bvid->depth = AV_RL32(buf + 12);
+ if (bvid->num_frames == 0)
+ return AVERROR_INVALIDDATA;
+
/* These are from 1990's games, sanity check this. */
if (bvid->width >= 65536 || bvid->height >= 65536 ||
bvid->depth > 24 || bvid->depth % 8 != 0) {