From 1ecb74024b66cd643549372f48ce828348ca5ba1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 16 Jul 2014 18:57:23 +0000 Subject: [PATCH] iwinfo: fix crash on parsing mtd (#15807) Signed-off-by: Felix Fietkau SVN-Revision: 41675 --- package/network/utils/iwinfo/src/iwinfo_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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\""))) { -- 2.30.2