aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ifxmips
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2009-06-02 20:10:29 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2009-06-02 20:10:29 +0000
commit0efe367787e75b8a2b7761e9bb17db2ada95111e (patch)
tree8ab657bf7710771d4bf3c8c9fb0ac41f3f2b1425 /target/linux/ifxmips
parent81d3b7905b83498b2127641fd7c45bf638536505 (diff)
downloadupstream-0efe367787e75b8a2b7761e9bb17db2ada95111e.tar.gz
upstream-0efe367787e75b8a2b7761e9bb17db2ada95111e.tar.bz2
upstream-0efe367787e75b8a2b7761e9bb17db2ada95111e.zip
Fix accessing array after it end.
SVN-Revision: 16301
Diffstat (limited to 'target/linux/ifxmips')
-rw-r--r--target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c b/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
index b4faf05356..a2d30cd0b6 100644
--- a/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
+++ b/target/linux/ifxmips/files/drivers/mtd/maps/ifxmips.c
@@ -232,9 +232,9 @@ static int ifxmips_mtd_probe(struct platform_device *dev)
if (err <= 0) {
if (ifxmips_has_brn_block()) {
- parts[4].size -= ifxmips_mtd->erasesize;
- parts[5].offset = ifxmips_mtd->size - ifxmips_mtd->erasesize;
- parts[5].size = ifxmips_mtd->erasesize;
+ parts[3].size -= ifxmips_mtd->erasesize;
+ parts[4].offset = ifxmips_mtd->size - ifxmips_mtd->erasesize;
+ parts[4].size = ifxmips_mtd->erasesize;
} else {
num_parts--;
}