[FFmpeg-cvslog] avformat/tmv: Check video chunk size
Michael Niedermayer
git at videolan.org
Fri Dec 22 01:53:15 EET 2023
ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Mon Oct 9 00:07:32 2023 +0200| [3fbe1be37437f66583bdd146d7f7fdd3c3961e36] | committer: Michael Niedermayer
avformat/tmv: Check video chunk size
This check matches the audio chunk check
Fixes: Timeout
Fixes: 62681/clusterfuzz-testcase-minimized-ffmpeg_dem_TMV_fuzzer-5299107876700160
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit b79fc7059600b28dce392fc20e5c8bd554c2fc95)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3fbe1be37437f66583bdd146d7f7fdd3c3961e36
---
libavformat/tmv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index b74af547c5..57f2e09df6 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -103,6 +103,10 @@ static int tmv_read_header(AVFormatContext *s)
char_cols = avio_r8(pb);
char_rows = avio_r8(pb);
tmv->video_chunk_size = char_cols * char_rows * 2;
+ if (!tmv->video_chunk_size) {
+ av_log(s, AV_LOG_ERROR, "invalid video chunk size\n");
+ return AVERROR_INVALIDDATA;
+ }
features = avio_r8(pb);
if (features & ~(TMV_PADDING | TMV_STEREO)) {
More information about the ffmpeg-cvslog
mailing list