aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-29 04:39:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-16 16:42:49 +0100
commit313ddbfe48bfd67dc8f9480d7d7cf887d6f485c1 (patch)
treebf13d0202b7ad1314c7b567681b0ea3e1c8391a5
parent7f5bd6c72be0e75f4c2c0b4a7878e32ba29dca93 (diff)
downloadffmpeg-313ddbfe48bfd67dc8f9480d7d7cf887d6f485c1.tar.gz
proresdec: Fix read via negative index in a global array.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 006508032057824a371bec4e629b66f8cbb26c47) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/proresdec2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index fe4cfd09b8..9f801e447a 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -302,7 +302,7 @@ static av_always_inline void decode_dc_coeffs(GetBitContext *gb, DCTELEM *out,
code = 5;
sign = 0;
for (i = 1; i < blocks_per_slice; i++, out += 64) {
- DECODE_CODEWORD(code, dc_codebook[FFMIN(code, 6)]);
+ DECODE_CODEWORD(code, dc_codebook[FFMIN(code, 6U)]);
if(code) sign ^= -(code & 1);
else sign = 0;
prev_dc += (((code + 1) >> 1) ^ sign) - sign;