]> git.ipfire.org Git - thirdparty/util-linux.git/commit
Fix off by one when checking "/dev/mapper/" path
authorDisconnect3d <dominik.b.czarnota@gmail.com>
Mon, 13 Apr 2020 14:14:10 +0000 (16:14 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2020 14:14:10 +0000 (16:14 +0200)
commit7fa6e867892cea778333c95e209feb20cebd250e
treef0ff6c9b26dd1df63044da24d56d2b0c131dfe64
parentea4dcdc788f2736c0f36cc59e79fb421e5bef915
Fix off by one when checking "/dev/mapper/" path

This PR fixes an off by one in `strncmp(dev->bid_name, "/dev/mapper/", 11)` check. The `"/dev/mapper/"` string literal has a length of 12 and without this fix paths like `"/dev/mapperSOMETHING"` would also be accepted.
libblkid/src/devname.c