summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2009-01-25 20:41:51 +0000
committerPeter Stuge <peter@stuge.se>2009-01-25 20:41:51 +0000
commit2cd767ce3aee41aafa6ab742292531ef1a85e5f7 (patch)
tree8c666a70866ccc8079c621239496594d46ff37e1 /flashrom.c
parent63f0c867ecba7c3dafdf811bfc6d3e1b0c8b919e (diff)
downloadflashrom-2cd767ce3aee41aafa6ab742292531ef1a85e5f7.zip
flashrom-2cd767ce3aee41aafa6ab742292531ef1a85e5f7.tar.gz
Fix stupid off-by-one error in erase verification
As reported by Jody McIntyre. Thanks! Corresponding to flashrom svn r389 and coreboot v2 svn r3894. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index 26585fb..4d8614a 100644
--- a/flashrom.c
+++ b/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",
OpenPOWER on IntegriCloud