aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index a50735a901..3ddb71bfa7 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -126,7 +126,7 @@ static int __mtdsplit_parse_uimage(struct mtd_info *master,
}
header = (struct uimage_header *)(buf + ret);
- uimage_size = sizeof(*header) + be32_to_cpu(header->ih_size);
+ uimage_size = sizeof(*header) + be32_to_cpu(header->ih_size) + ret;
if ((offset + uimage_size) > master->size) {
pr_debug("uImage exceeds MTD device \"%s\"\n",
master->name);