mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fedora 28: Fix misc bounds check compiler warnings
Fix a bunch of (mostly) sprintf/snprintf truncation compiler warnings that show up on Fedora 28 (GCC 8.0.1). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #7361 Closes #7368
This commit is contained in:
committed by
Brian Behlendorf
parent
1724eb62de
commit
21a4f5cc86
@@ -83,7 +83,8 @@ udev_device_get_devid(struct udev_device *dev, char *bufptr, size_t buflen)
|
||||
name = udev_list_entry_get_name(entry);
|
||||
if (strncmp(name, devbyid, strlen(devbyid)) == 0) {
|
||||
name += strlen(DEV_BYID_PATH);
|
||||
(void) stpncpy(bufptr, name, buflen);
|
||||
(void) stpncpy(bufptr, name, buflen - 1);
|
||||
bufptr[buflen - 1] = '\0';
|
||||
return (0);
|
||||
}
|
||||
entry = udev_list_entry_get_next(entry);
|
||||
|
||||
Reference in New Issue
Block a user