diff options
author | Peter Stuge <peter@stuge.se> | 2009-01-25 20:41:51 +0000 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2009-01-25 20:41:51 +0000 |
commit | 7e6ff8bfc0e5c9a5238f046892dc19bcbec55780 (patch) | |
tree | c12faa5c5aa2d23afe4d99607dc2807b8bcb919d | |
parent | 269e1bdd13803a1946c61075d27b9aa47de755d3 (diff) |
flashrom: Fix stupid off-by-one error in erase verification.
As reported by Jody McIntyre. Thanks!
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3894 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | util/flashrom/flashrom.c | 2 |
1 files changed, 1 insertions, 1 deletions
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", |