diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-22 02:17:05 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-23 17:25:48 +0300 |
commit | 4f727fbc7330e726d003e2961fa676ddaf86f994 (patch) | |
tree | a02f4a3d527598890e4386b69532edf8b2a29573 /libavcodec/h264_ps.c | |
parent | 0f34c0789f855f04dce518ffc93a01bb943ba1aa (diff) |
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>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 65d164d81c..b78ad251f5 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -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; |