From: Mingjie Shen Date: Wed, 11 Jun 2025 21:11:35 +0000 (-0400) Subject: libblkid/src/topology/dm: fix fscanf return value check to match expected number... X-Git-Tag: v2.41.1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48fbe43a5f2a252342fb4dea24702847608b3db1;p=thirdparty%2Futil-linux.git libblkid/src/topology/dm: fix fscanf return value check to match expected number of parsed items (cherry picked from commit 51c0697e5551fe3c2d481a4ac71d81695e5374ba) --- diff --git a/libblkid/src/topology/dm.c b/libblkid/src/topology/dm.c index 612b5df33..65117106d 100644 --- a/libblkid/src/topology/dm.c +++ b/libblkid/src/topology/dm.c @@ -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);