mirror of
https://github.com/systemd/systemd.git
synced 2024-12-28 11:21:59 +03:00
udev: strdupa() → strdupa_safe()
This commit is contained in:
parent
73151fbe30
commit
1a9a61f9cc
@ -921,7 +921,7 @@ static int get_usb_specifier(sd_device *dev, char **ret) {
|
|||||||
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL),
|
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL),
|
||||||
"sysname \"%s\" does not have '-' in the expected place.", sysname);
|
"sysname \"%s\" does not have '-' in the expected place.", sysname);
|
||||||
|
|
||||||
ports = strdupa(s + 1);
|
ports = strdupa_safe(s + 1);
|
||||||
s = strchr(ports, ':');
|
s = strchr(ports, ':');
|
||||||
if (!s)
|
if (!s)
|
||||||
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL),
|
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL),
|
||||||
|
Loading…
Reference in New Issue
Block a user