aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-12-22 03:12:03 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-12-28 20:26:53 +0100
commit52b7672ef65407ea32b6f17262712ddb894acd73 (patch)
tree328e47b23dda662900f256c2c043c1c2dbfc2c88
parentd758323bfaecf27cbd57fd7a442fc29bde9289c4 (diff)
downloadffmpeg-52b7672ef65407ea32b6f17262712ddb894acd73.tar.gz
avcodec/hevcdsp_template.c: Fix undefined shift in FUNC(dequant)
Fixes: runtime error: left shift of negative value -180 Fixes: 4626/clusterfuzz-testcase-minimized-5647837887987712 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 0c9ab5ef9c1ee852c80c859c9e07efe8730b57ed) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/hevcdsp_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index 9bea9a6875..da21f9216a 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -152,7 +152,7 @@ static void FUNC(transform_skip)(int16_t *_coeffs, int16_t log2_size)
} else {
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
- *coeffs = *coeffs << -shift;
+ *coeffs = *(uint16_t*)coeffs << -shift;
coeffs++;
}
}