[FFmpeg-cvslog] r15223 - trunk/libavcodec/ra144.c

vitor subversion
Sat Sep 6 13:46:29 CEST 2008


Author: vitor
Date: Sat Sep  6 13:46:29 2008
New Revision: 15223

Log:
Test a var for overflow just after it is set

Modified:
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Sat Sep  6 13:46:29 2008
@@ -251,11 +251,11 @@ static int eval_refl(int *refl, const in
         for (j=0; j <= i; j++)
             bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * (0x1000000 / b)) >> 12;
 
-        refl[i] = bp1[i];
-
         if ((unsigned) bp1[i] + 0x1000 > 0x1fff)
             return 1;
 
+        refl[i] = bp1[i];
+
         FFSWAP(int *, bp1, bp2);
     }
     return 0;




More information about the ffmpeg-cvslog mailing list