diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-12-22 03:12:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-08 23:19:14 +0100 |
commit | 954c2b07b6fe2a745feb42a9364fbfcdd932002f (patch) | |
tree | 44a0b8db1bd7075d7079dc6bc5f0f9bcfc8c1cc7 | |
parent | 2c60731777f62873a951a9c1857f8315315d1b4b (diff) | |
download | ffmpeg-954c2b07b6fe2a745feb42a9364fbfcdd932002f.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index 57d18bd176..4d2e6bf453 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -125,7 +125,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++; } } |