Browse Source

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 0014249fd9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3.2
Michael Niedermayer 5 years ago
parent
commit
87c071a7c8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/nutdec.c

+ 1
- 1
libavformat/nutdec.c View File

@@ -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)


Loading…
Cancel
Save