From 7e6ff8bfc0e5c9a5238f046892dc19bcbec55780 Mon Sep 17 00:00:00 2001 From: Peter Stuge Date: Sun, 25 Jan 2009 20:41:51 +0000 Subject: flashrom: Fix stupid off-by-one error in erase verification. As reported by Jody McIntyre. Thanks! Signed-off-by: Peter Stuge Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3894 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/flashrom/flashrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/flashrom/flashrom.c b/util/flashrom/flashrom.c index 26585fb72e..4d8614a33a 100644 --- a/util/flashrom/flashrom.c +++ b/util/flashrom/flashrom.c @@ -605,7 +605,7 @@ int main(int argc, char *argv[]) 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", -- cgit v1.2.3