]> 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)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Jun 2025 11:36:40 +0000 (13:36 +0200)
(cherry picked from commit 51c0697e5551fe3c2d481a4ac71d81695e5374ba)

libblkid/src/topology/dm.c

index 612b5df3369e2a544c8ee9af0ae5b37f1e41adfc..65117106d0b877d9b744fe86e416cd39e66727df 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);