1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/h264_slice: Use unsigned for fgs seed computation

Fixes: signed integer overflow: 2147481600 + 13408 cannot be represented in type 'int'
Fixes: 53963/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-4650467311616000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2022-12-18 17:47:25 +01:00
parent 9ea2c79631
commit 685c0cfd32
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -1228,7 +1228,7 @@ static int h264_export_frame_props(H264Context *h)
ret = ff_h2645_sei_to_frame(out, &h->sei.common, AV_CODEC_ID_H264, h->avctx,
&sps->vui, sps->bit_depth_luma, sps->bit_depth_chroma,
cur->poc + (h->poc_offset << 5));
cur->poc + (unsigned)(h->poc_offset << 5));
if (ret < 0)
return ret;