rendered paste body@@--- linux-2.6.18/drivers/mtd/redboot.c 2006-10-18 08:08:36.000000000 -0400
@@+++ kernel-2.6.16-squashfs/linux-2.6.16/drivers/mtd/redboot.c 2006-09-16 23:21:13.000000000 -0400
@@ -85,6 +85,10 @@
numslots = (master->erasesize / sizeof(struct fis_image_desc));
for (i = 0; i < numslots; i++) {
+ if (buf[i].name[0] == 0xff) {
+ i = numslots;
+ break;
+ }
if (!memcmp(buf[i].name, "FIS directory", 14)) {
/* This is apparently the FIS directory entry for the
* FIS directory itself. To discover whether the entries
@@ -155,7 +159,7 @@
struct fis_list *new_fl, **prev;
if (buf[i].name[0] == 0xff)
- continue;
+ break;
if (!redboot_checksum(&buf[i]))
break;