aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-05-23 23:17:35 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 12:11:55 +0200
commitab203f91578c546b2fd6480b2ee14d12e41fcfb5 (patch)
tree6d910d6981a97c2a736c4a9655daa3c58f28c952
parentb625f2b6d4e7535eaf9d2a813d55e24609a76c3e (diff)
downloadffmpeg-ab203f91578c546b2fd6480b2ee14d12e41fcfb5.tar.gz
avcodec/h264_parse: Use 64bit for expectedpoc and expected_delta_per_poc_cycle
Fixes: signed integer overflow: -2142516591 + -267814575 cannot be represented in type 'int' Fixes: 14450/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5716105319940096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 4896fa18add7636ea9986edde51493331f1fb01e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/h264_parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
index dfc57076d1..89fd0ede29 100644
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@ -296,7 +296,8 @@ int ff_h264_init_poc(int pic_field_poc[2], int *pic_poc,
if (picture_structure == PICT_FRAME)
field_poc[1] += pc->delta_poc_bottom;
} else if (sps->poc_type == 1) {
- int abs_frame_num, expected_delta_per_poc_cycle, expectedpoc;
+ int abs_frame_num;
+ int64_t expected_delta_per_poc_cycle, expectedpoc;
int i;
if (sps->poc_cycle_length != 0)