sd-device: refuse to get a parent device by sd_device_new_child()

This commit is contained in:
Yu Watanabe
2022-09-23 06:53:09 +09:00
parent c9d65b921b
commit 10a2f90d02
+1 -1
View 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);