From: Felix Fietkau Date: Wed, 16 Jul 2014 18:57:23 +0000 (+0000) Subject: iwinfo: fix crash on parsing mtd (#15807) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1ecb74024b66cd643549372f48ce828348ca5ba1;p=librecmc%2Flibrecmc.git iwinfo: fix crash on parsing mtd (#15807) Signed-off-by: Felix Fietkau SVN-Revision: 41675 --- 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\""))) {