libfstools: avoid false positives when matching devices and volumes
[project/fstools.git] / libfstools / ubi.c
index f9d6e0aaa718ef941862297cae84afaebf7440c8..091ccf6e5bbf0dc561853be7873290a6df3165d9 100644 (file)
@@ -147,7 +147,7 @@ static struct volume *ubi_volume_match(char *name, int ubi_num, int volid)
                return NULL;
        }
 
-       if (strncmp(name, volname, strlen(volname) + 1))
+       if (strcmp(name, volname))
                return NULL;
 
        p = calloc(1, sizeof(struct ubi_volume));