]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: refuse to get a parent device by sd_device_new_child()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 20 Sep 2022 01:47:14 +0000 (10:47 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 22 Sep 2022 21:53:09 +0000 (06:53 +0900)
src/libsystemd/sd-device/sd-device.c

index 9364a69dcd00d7283ed6243d099779db81528db1..ab96f889cb1450c763c16bb056e5ab2a5cd4828f 100644 (file)
@@ -879,7 +879,7 @@ _public_ int sd_device_new_child(sd_device **ret, sd_device *device, const char
         assert_return(device, -EINVAL);
         assert_return(suffix, -EINVAL);
 
-        if (!path_is_normalized(suffix))
+        if (!path_is_safe(suffix))
                 return -EINVAL;
 
         r = sd_device_get_syspath(device, &s);