aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-11-09 20:42:56 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-01-21 20:21:32 +0100
commit7540d60bf687ae1f18927c5e6c3dbd317df9f35e (patch)
tree835d03541a5fcf8177e30f23f09f1d5e811766be
parent1b1dac2716d713dfd6949b7eb4a3c18c16f1faf6 (diff)
downloadffmpeg-7540d60bf687ae1f18927c5e6c3dbd317df9f35e.tar.gz
avformat/dhav: Break out of infinite dhav search loop
Fixes: Infinite loop Fixes: 26922/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-5794549613723648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/dhav.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/dhav.c b/libavformat/dhav.c
index 6a6c235e65..526331ae4c 100644
--- a/libavformat/dhav.c
+++ b/libavformat/dhav.c
@@ -281,6 +281,8 @@ static int dhav_read_header(AVFormatContext *s)
int seek_back;
seek_back = avio_rl32(s->pb) + 8;
+ if (seek_back < 9)
+ break;
dhav->last_good_pos = avio_tell(s->pb);
avio_seek(s->pb, -seek_back, SEEK_CUR);
}