aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-16 18:57:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-16 18:57:23 +0000
commit1ecb74024b66cd643549372f48ce828348ca5ba1 (patch)
tree9f81727bce8ced4f33906827b6f1570920610af1 /package/network
parent0af20bbfc840d4a2b16f34fbf71bafe80840d275 (diff)
downloadupstream-1ecb74024b66cd643549372f48ce828348ca5ba1.tar.gz
upstream-1ecb74024b66cd643549372f48ce828348ca5ba1.tar.bz2
upstream-1ecb74024b66cd643549372f48ce828348ca5ba1.zip
iwinfo: fix crash on parsing mtd (#15807)
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 41675
Diffstat (limited to 'package/network')
-rw-r--r--package/network/utils/iwinfo/src/iwinfo_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/utils/iwinfo/src/iwinfo_utils.c b/package/network/utils/iwinfo/src/iwinfo_utils.c
index 1a831f3ac1..dd49303f8a 100644
--- a/package/network/utils/iwinfo/src/iwinfo_utils.c
+++ b/package/network/utils/iwinfo/src/iwinfo_utils.c
@@ -182,7 +182,7 @@ int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id *id)
while (fgets(buf, sizeof(buf), mtd) > 0)
{
- if (fscanf(mtd, "mtd%d: %*x %x %127s", &off, &len, buf) < 3 ||
+ if (fscanf(mtd, "mtd%d: %x %*x %127s", &off, &len, buf) < 3 ||
(strcmp(buf, "\"boardconfig\"") && strcmp(buf, "\"EEPROM\"") &&
strcmp(buf, "\"factory\"")))
{