diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-07-16 18:57:23 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-07-16 18:57:23 +0000 |
commit | 221bc9dbb1f6f60ddfd9e4ed71c69487836e0d88 (patch) | |
tree | fea5bda27ca0eb351f7c91da942f6645ad20bd24 /package | |
parent | 64d401bb8ac1f0793a3f0283ad4dd1c8169c9d8f (diff) | |
download | upstream-221bc9dbb1f6f60ddfd9e4ed71c69487836e0d88.tar.gz upstream-221bc9dbb1f6f60ddfd9e4ed71c69487836e0d88.tar.bz2 upstream-221bc9dbb1f6f60ddfd9e4ed71c69487836e0d88.zip |
iwinfo: fix crash on parsing mtd (#15807)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41675 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/network/utils/iwinfo/src/iwinfo_utils.c | 2 |
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\""))) { |