aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-08-15 00:37:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-08-28 17:38:28 +0200
commit4e39795c75e664ef06f17473adec8c75fcf9de6f (patch)
tree9b4b58b3a3f285a27bae042148cbbac676b54e97
parent53387079301690f1bd38b97fdf31d63194201d17 (diff)
downloadffmpeg-4e39795c75e664ef06f17473adec8c75fcf9de6f.tar.gz
avformat/mvdec: Check if name was fully read
Fixes: use of uninitialized value Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024 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/mvdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c
index 0718f0483a..c045d2c7c8 100644
--- a/libavformat/mvdec.c
+++ b/libavformat/mvdec.c
@@ -256,7 +256,8 @@ static int read_table(AVFormatContext *avctx, AVStream *st,
if (avio_feof(pb))
return AVERROR_EOF;
- avio_read(pb, name, 16);
+ if (avio_read(pb, name, 16) != 16)
+ return AVERROR_INVALIDDATA;
name[sizeof(name) - 1] = 0;
size = avio_rb32(pb);
if (size < 0) {