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-21 23:19:37 +0300
commitb0700a13140e0fb7008678ad65f5267019a22867 (patch)
treec1e686d3508aa6adb13711800cc5c6392c22cc8f
parent01705cc06209c0995bd09f559c2265b86a5dc2c6 (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 23591d73a4..3d07eb250a 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);