diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-31 22:02:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-05 23:16:54 +0200 |
commit | 041ad6d2bb44eb4a673e5de61c7e7b0766170714 (patch) | |
tree | 19d389a0c1b499fa8b61a5770174006f41c38ba6 /libavcodec | |
parent | 368aa6aac74fcfcc6d797e31f9fd635e47f0e8c3 (diff) | |
download | ffmpeg-041ad6d2bb44eb4a673e5de61c7e7b0766170714.tar.gz |
avcodec/hevc_ps: Fix runtime error: signed integer overflow: 2147483628 + 256 cannot be represented in type 'int'
Fixes: 1909/clusterfuzz-testcase-minimized-6732072662073344
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6726328f7940a76c43b4d97ac37ababf363d042f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevc_ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 14f908e8de..d8782cd3f3 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -720,7 +720,7 @@ static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingLi ff_hevc_diag_scan8x8_x[i]; scaling_list_delta_coef = get_se_golomb(gb); - next_coef = (next_coef + scaling_list_delta_coef + 256) % 256; + next_coef = (next_coef + 256U + scaling_list_delta_coef) % 256; sl->sl[size_id][matrix_id][pos] = next_coef; } } |