[xiph-commits] r14669 - trunk/theora/lib/enc
giles at svn.xiph.org
giles at svn.xiph.org
Mon Apr 7 20:18:28 PDT 2008
Author: giles
Date: 2008-04-07 20:18:26 -0700 (Mon, 07 Apr 2008)
New Revision: 14669
Modified:
trunk/theora/lib/enc/frarray.c
Log:
Check for out of bounds before dereferencing instead of after.
Patch by ogg.k.ogg.k.
Modified: trunk/theora/lib/enc/frarray.c
===================================================================
--- trunk/theora/lib/enc/frarray.c 2008-04-07 19:47:05 UTC (rev 14668)
+++ trunk/theora/lib/enc/frarray.c 2008-04-08 03:18:26 UTC (rev 14669)
@@ -300,7 +300,7 @@
/* Now code the block flags. */
for ( i = 0; i < BListIndex; ) {
run_count = 0;
- while ( (cpi->BlockCodedFlags[i] == val) && (i < BListIndex) ) {
+ while ( (i < BListIndex) && (cpi->BlockCodedFlags[i] == val) ) {
i++;
run_count++;
}
More information about the commits
mailing list