Author: stuge
Date: 2009-01-25 21:41:51 +0100 (Sun, 25 Jan 2009)
New Revision: 3894

Modified:
   trunk/util/flashrom/flashrom.c
Log:
flashrom: Fix stupid off-by-one error in erase verification.

As reported by Jody McIntyre. Thanks!

Signed-off-by: Peter Stuge <[email protected]>
Acked-by: Peter Stuge <[email protected]>


Modified: trunk/util/flashrom/flashrom.c
===================================================================
--- trunk/util/flashrom/flashrom.c      2009-01-24 23:01:08 UTC (rev 3893)
+++ trunk/util/flashrom/flashrom.c      2009-01-25 20:41:51 UTC (rev 3894)
@@ -605,7 +605,7 @@
                        memcpy(buf, (const char *)flash->virtual_memory, size);
                else
                        flash->read(flash, buf);
-               for (erasedbytes = 0; erasedbytes <= size; erasedbytes++)
+               for (erasedbytes = 0; erasedbytes < size; erasedbytes++)
                        if (0xff != buf[erasedbytes]) {
                                printf("FAILED!\n");
                                fprintf(stderr, "ERROR at 0x%08x: 
Expected=0xff, Read=0x%02x\n",


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to