]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: strdupa() → strdupa_safe() 29704/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 09:29:20 +0000 (11:29 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 09:29:20 +0000 (11:29 +0200)
src/udev/udev-builtin-net_id.c

index d88d4f7dd5e9555d43ce10369cdf453c3bd7229c..91b40088f49844f6b84098e935d001c296a0e29d 100644 (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),