aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2009-06-02 20:10:29 +0000
committerHauke Mehrtens <hauke@openwrt.org>2009-06-02 20:10:29 +0000
commit8c4795f14bcd823592aba23de9cfcab722d65d5d (patch)
treef789773db9eb85d62e1f92bdd025ddecdfc2de12 /target/linux
parentf8020502a11d8d20bf1943d753ee6af9552d7762 (diff)
downloadmaster-187ad058-8c4795f14bcd823592aba23de9cfcab722d65d5d.tar.gz
master-187ad058-8c4795f14bcd823592aba23de9cfcab722d65d5d.tar.bz2
master-187ad058-8c4795f14bcd823592aba23de9cfcab722d65d5d.zip
[ifxmips] Fix accessing array after it end.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16301 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-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--;
}