]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid/src/topology/dm: fix fscanf return value check to match expected number...
authorMingjie Shen <shen497@purdue.edu>
Wed, 11 Jun 2025 21:11:35 +0000 (17:11 -0400)
committerGitHub <noreply@github.com>
Wed, 11 Jun 2025 21:11:35 +0000 (17:11 -0400)
libblkid/src/topology/dm.c

index 62fa179451d169a82a95f68d3662bd48bc0b3ee8..7687e327a66cfe3ad38ff9d75203574dde2dd426 100644 (file)
@@ -108,7 +108,7 @@ static int probe_dm_tp(blkid_probe pr,
        }
 
        if (fscanf(stream, "%lld %lld striped %d %d ",
-                       &offset, &size, &stripes, &stripesize) != 0)
+                       &offset, &size, &stripes, &stripesize) != 4)
                goto nothing;
 
        blkid_topology_set_minimum_io_size(pr, stripesize << 9);