Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-07-07 00:54:49 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-10-28 22:04:04 +0300
commit4228a66beff4b1257cdd065d450f1dbcf2aebe1e (patch)
tree54428f6473c221cfcac26393674dc6be68b24701
parent7593a9aa2118644a2fd6d2bdc0c2d252641c9e52 (diff)
avformat/nutdec: Check get_packetheader() in mainheader
Fixes; Timeout Fixes: 48794/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6524604713140224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b5de084aa63b79586bc445e6a7fea837688b3941) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/nutdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 6f8a9350a9..d0972517cd 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -235,6 +235,8 @@ static int decode_main_header(NUTContext *nut)
int tmp_stream, tmp_mul, tmp_pts, tmp_size, tmp_res, tmp_head_idx;
length = get_packetheader(nut, bc, 1, MAIN_STARTCODE);
+ if (length == (uint64_t)-1)
+ return AVERROR_INVALIDDATA;
end = length + avio_tell(bc);
nut->version = ffio_read_varlen(bc);