summaryrefslogtreecommitdiff
path: root/libdm
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-07-27 15:43:23 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-07-28 00:49:28 +0200
commitd4994915015498bc0382fc6624d2f843f865ae51 (patch)
tree332695df528f83ad6860c550eb47613175369647 /libdm
parent046d85af3d7a103573e56ef6861dc5d6ded9ecc7 (diff)
downloadlvm2-d4994915015498bc0382fc6624d2f843f865ae51.tar.gz
cov: ensure bufffe size is at least 5
Analyzer can now see, the buffer size will have at least 5 chars on succefull path.
Diffstat (limited to 'libdm')
-rw-r--r--libdm/libdm-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index 708414676..56fb436bc 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -1919,7 +1919,7 @@ static int _sysfs_find_kernel_name(uint32_t major, uint32_t minor, char *buf, si
continue;
if ((sz = dm_snprintf(path, sizeof(path), "%sblock/%s/dev",
- _sysfs_dir, name)) == -1) {
+ _sysfs_dir, name)) < 5) {
log_warn("Couldn't create path for %s.", name);
continue;
}