[coreboot] r3894 - trunk/util/flashrom

svn at coreboot.org svn at coreboot.org
Sun Jan 25 21:41:51 CET 2009


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 <peter at stuge.se>
Acked-by: Peter Stuge <peter at stuge.se>


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",





More information about the coreboot mailing list