mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
[PATCH] check for empty symlink string
Attached is a patch for udev-add.c to ignore empty symlink string parts. Issue was brought up by ide-devfs.sh with only one symlink returned, while two are expected.
This commit is contained in:
parent
2441c20743
commit
0529e2ed2e
@ -193,7 +193,7 @@ static int create_node(struct udevice *dev)
|
|||||||
symlinks = dev->symlink;
|
symlinks = dev->symlink;
|
||||||
while (1) {
|
while (1) {
|
||||||
linkname = strsep(&symlinks, " ");
|
linkname = strsep(&symlinks, " ");
|
||||||
if (linkname == NULL)
|
if (linkname == NULL || linkname[0] == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
strncpy(filename, udev_root, sizeof(filename));
|
strncpy(filename, udev_root, sizeof(filename));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user