diff options
Diffstat (limited to 'src/libudev/libudev-util.c')
-rw-r--r-- | src/libudev/libudev-util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c index 44f6e4a863..714dc50ae9 100644 --- a/src/libudev/libudev-util.c +++ b/src/libudev/libudev-util.c @@ -241,8 +241,7 @@ int util_resolve_sys_link(struct udev *udev, char *syspath, size_t size) return -EINVAL; base[0] = '\0'; } - if (base == NULL) - return -EINVAL; + strscpyl(base, size - (base - syspath), "/", &link_target[back * 3], NULL); return 0; } |