diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-02-12 20:13:20 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-02-12 20:13:20 +0000 |
commit | 1ac4c843665031399429e8190a23773c9f832a1c (patch) | |
tree | 44bfabf778de07e138659612f4fb1fb27687c82d /target | |
parent | d6aea3e300081e666d76e1568154a2f5c69e103d (diff) | |
download | master-187ad058-1ac4c843665031399429e8190a23773c9f832a1c.tar.gz master-187ad058-1ac4c843665031399429e8190a23773c9f832a1c.tar.bz2 master-187ad058-1ac4c843665031399429e8190a23773c9f832a1c.zip |
kernel: mtdsplit_uimage: fix passed info about buf size
We obviously can't use sizeof(*buf) which is always 1.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44424 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c | 4 |
1 files changed, 2 insertions, 2 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 2bb5e9aff8..2602f98b55 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c @@ -113,11 +113,11 @@ static int __mtdsplit_parse_uimage(struct mtd_info *master, uimage_size = 0; - ret = read_uimage_header(master, offset, buf, sizeof(*buf)); + ret = read_uimage_header(master, offset, buf, MAX_HEADER_LEN); if (ret) continue; - ret = find_header(buf, sizeof(*buf)); + ret = find_header(buf, MAX_HEADER_LEN); if (ret < 0) { pr_debug("no valid uImage found in \"%s\" at offset %llx\n", master->name, (unsigned long long) offset); |