]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/flac_parser: Make expected_frame_num, expected_sample_num 64bit
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 19 Sep 2019 14:28:57 +0000 (16:28 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 8 Oct 2019 14:24:58 +0000 (16:24 +0200)
Fixes: Integer overflow
Fixes: 17199/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLAC_fuzzer-5696145187143680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/flac_parser.c

index 9280246af2a0193e5b2a8d41686e3003e98e32a2..9ffa288548e463ca4452f7174236bb5fa58b1739 100644 (file)
@@ -313,7 +313,7 @@ static int check_header_mismatch(FLACParseContext  *fpc,
         (child_fi->frame_or_sample_num
          != header_fi->frame_or_sample_num + 1)) {
         FLACHeaderMarker *curr;
-        int expected_frame_num, expected_sample_num;
+        int64_t expected_frame_num, expected_sample_num;
         /* If there are frames in the middle we expect this deduction,
            as they are probably valid and this one follows it */