X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=libfstools%2Fmtd.c;h=b9daabcb595e75cd4cd12f9757729b55257e2e77;hp=00bb2d6a549398cef21b315493fedd8485e9fc62;hb=233d957c7662b667fb5470c05641e51e802df97c;hpb=a1f48fc0444f5c3c44ee6ef1005cd8da65decefd diff --git a/libfstools/mtd.c b/libfstools/mtd.c index 00bb2d6..b9daabc 100644 --- a/libfstools/mtd.c +++ b/libfstools/mtd.c @@ -130,7 +130,9 @@ static char* mtd_find_index(char *name) return index; while (!index && fgets(line, sizeof(line), fp)) { - if (strstr(line, name)) { + char *ret; + + if ((ret = strstr(line, name)) && (ret[strlen(name)] == '"')) { char *eol = strstr(line, ":"); if (!eol)