[MN-dev] [mndiff]: r205 - trunk/noe/rs.c

michael subversion at mplayerhq.hu
Mon Jul 19 16:20:20 CEST 2010


Author: michael
Date: Mon Jul 19 16:20:19 2010
New Revision: 205

Log:
Fix apparent off by 1 error in failure detection of scaning the error locator

Modified:
   trunk/noe/rs.c

Modified: trunk/noe/rs.c
==============================================================================
--- trunk/noe/rs.c	Mon Jul 19 16:20:18 2010	(r204)
+++ trunk/noe/rs.c	Mon Jul 19 16:20:19 2010	(r205)
@@ -439,7 +439,7 @@ for(i=0; i<erasureCount; i++){
         EXT(gfft)(errorLocator, errorLocator, codeBits);
 
         for(j=0,i=0; j<errorCount; i++){
-            if(i > codeCount)
+            if(i >= codeCount)
                 return -1;
             if(!errorLocator[i])
                 error[j++]= i ? MINUS1 -  bitReverse(i, SHIFT) : 0;


More information about the Mndiff-dev mailing list