aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-17 14:54:19 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-17 23:34:20 +0200
commitba23d53710ec67c1a5499578a180a2ceb68c8ced (patch)
treed3843695eacb40d1a938658d71501400ee32d8e0 /libavcodec
parent1ce850f96da266df58a5c5235c0ff1a5e32814dc (diff)
downloadffmpeg-ba23d53710ec67c1a5499578a180a2ceb68c8ced.tar.gz
avcodec/hevcpred_template: Fix left shift of negative value
Fixes: runtime error: left shift of negative value -1 Fixes: 2250/clusterfuzz-testcase-minimized-5693382112313344 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 c94326c1fc2fb5719c6f28fe1b95c0c74417998b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevcpred_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c
index 6ae87cca13..6fe33546b1 100644
--- a/libavcodec/hevcpred_template.c
+++ b/libavcodec/hevcpred_template.c
@@ -35,7 +35,7 @@ static av_always_inline void FUNC(intra_pred)(HEVCContext *s, int x0, int y0,
#define MVF(x, y) \
(s->ref->tab_mvf[(x) + (y) * min_pu_width])
#define MVF_PU(x, y) \
- MVF(PU(x0 + ((x) << hshift)), PU(y0 + ((y) << vshift)))
+ MVF(PU(x0 + ((x) * (1 << hshift))), PU(y0 + ((y) * (1 << vshift))))
#define IS_INTRA(x, y) \
(MVF_PU(x, y).pred_flag == PF_INTRA)
#define MIN_TB_ADDR_ZS(x, y) \