[FFmpeg-devel] [PATCH 1/4] avformat/genh: Check block_align
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 19 18:59:52 EEST 2020
Fixes: infinite loop
Fixes: 26440/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5632134020333568
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/genh.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/genh.c b/libavformat/genh.c
index 61adf49964..544d063aa4 100644
--- a/libavformat/genh.c
+++ b/libavformat/genh.c
@@ -144,6 +144,9 @@ static int genh_read_header(AVFormatContext *s)
}
}
+ if (st->codecpar->block_align <= 0)
+ return AVERROR_INVALIDDATA;
+
avio_skip(s->pb, start_offset - avio_tell(s->pb));
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
--
2.17.1
More information about the ffmpeg-devel
mailing list