mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/h264_ps: Fix runtime error: signed integer overflow: 2147483647 + 26 cannot be represented in type 'int'
Fixes: 902/clusterfuzz-testcase-4561155144024064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0f34c0789f
commit
4f727fbc73
@ -800,8 +800,8 @@ int ff_h264_decode_picture_parameter_set(GetBitContext *gb, AVCodecContext *avct
|
||||
|
||||
pps->weighted_pred = get_bits1(gb);
|
||||
pps->weighted_bipred_idc = get_bits(gb, 2);
|
||||
pps->init_qp = get_se_golomb(gb) + 26 + qp_bd_offset;
|
||||
pps->init_qs = get_se_golomb(gb) + 26 + qp_bd_offset;
|
||||
pps->init_qp = get_se_golomb(gb) + 26U + qp_bd_offset;
|
||||
pps->init_qs = get_se_golomb(gb) + 26U + qp_bd_offset;
|
||||
pps->chroma_qp_index_offset[0] = get_se_golomb(gb);
|
||||
if (pps->chroma_qp_index_offset[0] < -12 || pps->chroma_qp_index_offset[0] > 12) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
|
Loading…
Reference in New Issue
Block a user