[FFmpeg-cvslog] proresdec: Fix read via negative index in a global array.

Michael Niedermayer git at videolan.org
Thu Feb 2 01:22:57 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 29 04:39:37 2012 +0100| [006508032057824a371bec4e629b66f8cbb26c47] | committer: Michael Niedermayer

proresdec: Fix read via negative index in a global array.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=006508032057824a371bec4e629b66f8cbb26c47
---

 libavcodec/proresdec2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index fe4cfd0..9f801e4 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;



More information about the ffmpeg-cvslog mailing list