summaryrefslogtreecommitdiff
path: root/libavcodec/h274.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-10-04 23:52:52 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 11:42:16 +0200
commit98aec8c1b864e44636c0fabdaff3494d2051fda3 (patch)
tree50c032a4106ad5058f92f3c2686b522f2d575bf7 /libavcodec/h274.c
parent849138f476f4b08656681bfc3aec5beac47777fb (diff)
downloadffmpeg-98aec8c1b864e44636c0fabdaff3494d2051fda3.tar.gz
avcodec/h274: Fix signed left shift
Fixes: 39463/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5736517629247488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h274.c')
-rw-r--r--libavcodec/h274.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h274.c b/libavcodec/h274.c
index 20401ba06b..a69f941142 100644
--- a/libavcodec/h274.c
+++ b/libavcodec/h274.c
@@ -145,8 +145,8 @@ static void deblock_8x8_c(int8_t *out, const int out_stride)
for (int y = 0; y < 8; y++) {
const int8_t l1 = out[-2], l0 = out[-1];
const int8_t r0 = out[0], r1 = out[1];
- out[0] = (l0 + (r0 << 1) + r1) >> 2;
- out[-1] = (r0 + (l0 << 1) + l1) >> 2;
+ out[0] = (l0 + r0 * 2 + r1) >> 2;
+ out[-1] = (r0 + l0 * 2 + l1) >> 2;
out += out_stride;
}
}