1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-27 07:22:31 +03:00

udev: strdupa() → strdupa_safe()

This commit is contained in:
Frantisek Sumsal 2023-10-25 11:29:20 +02:00
parent 73151fbe30
commit 1a9a61f9cc

View File

@ -921,7 +921,7 @@ static int get_usb_specifier(sd_device *dev, char **ret) {
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL),
"sysname \"%s\" does not have '-' in the expected place.", sysname);
ports = strdupa(s + 1);
ports = strdupa_safe(s + 1);
s = strchr(ports, ':');
if (!s)
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL),