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>2021-01-17 00:44:33 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-10 17:04:26 +0300
commite5dbd96637c990f3eeb41b43705d47c39d5284d7 (patch)
tree3141e1c6d5e3b7e727a6c0ff60f35ddc35b9e4ae /libavformat/nutdec.c
parent9cc75e54a88614286d228b331fd64e80a8297714 (diff)
avformat/nutdec: Fix integer overflow in count computation
Note, the value is checked a few lines later already Fixes: signed integer overflow: -440402016 - 1879048064 cannot be represented in type 'int' Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6603876618469376 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 0014249fd92132515b3ff0ce034dd65e745cb400) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r--libavformat/nutdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 979cb9a031..430b023d0c 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -260,7 +260,7 @@ static int decode_main_header(NUTContext *nut)
if (tmp_fields > 5)
count = ffio_read_varlen(bc);
else
- count = tmp_mul - tmp_size;
+ count = tmp_mul - (unsigned)tmp_size;
if (tmp_fields > 6)
get_s(bc);
if (tmp_fields > 7)