[FFmpeg-cvslog] avformat/vividas: Add EOF check in val_1 loop in track_header()
Michael Niedermayer
git at videolan.org
Wed Nov 20 16:52:42 EET 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Oct 29 22:17:45 2019 +0100| [faea5b4462c4325b4ec7c150c3c31929429773cc] | committer: Michael Niedermayer
avformat/vividas: Add EOF check in val_1 loop in track_header()
Fixes: Timeout (148sec -> 0.1sec)
Fixes: 18427/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5682124627116032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=faea5b4462c4325b4ec7c150c3c31929429773cc
---
libavformat/vividas.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index ab3947815a..a55f5c0ead 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -295,6 +295,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
for (i=0;i<val_1;i++) {
int c = avio_r8(pb);
for (j=0;j<c;j++) {
+ if (avio_feof(pb))
+ return AVERROR_EOF;
avio_r8(pb); // val_3
avio_r8(pb); // val_4
}
More information about the ffmpeg-cvslog
mailing list