[FFmpeg-devel,2/4] avcodec/flac_parser: Make expected_frame_num, expected_sample_num 64bit

Submitted by Michael Niedermayer on Sept. 19, 2019, 7:37 p.m.

Details

Message ID 20190919193741.21138-2-michael@niedermayer.cc
State Accepted
Commit c552c3ef70dc353ad5c18d145aa0167cf7b64c67
Headers show

Commit Message

Michael Niedermayer Sept. 19, 2019, 7:37 p.m.
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Oct. 8, 2019, 12:50 p.m.
On Thu, Sep 19, 2019 at 09:37:39PM +0200, Michael Niedermayer wrote:
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply


[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index f085159d1d..60145040d5 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -321,7 +321,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 */