ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Mon 
Nov  9 20:42:56 2020 +0100| [7540d60bf687ae1f18927c5e6c3dbd317df9f35e] | 
committer: Michael Niedermayer

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 <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7540d60bf687ae1f18927c5e6c3dbd317df9f35e
---

 libavformat/dhav.c | 2 ++
 1 file changed, 2 insertions(+)

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);
             }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to