1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: ensure bufffe size is at least 5

Analyzer can now see, the buffer size will have at least 5 chars
on succefull path.
This commit is contained in:
Zdenek Kabelac 2021-07-27 15:43:23 +02:00
parent 046d85af3d
commit d499491501
2 changed files with 2 additions and 2 deletions

View File

@ -1920,7 +1920,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;
}

View File

@ -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;
}