diff options
Diffstat (limited to 'udev_libc_wrapper.c')
-rw-r--r-- | udev_libc_wrapper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/udev_libc_wrapper.c b/udev_libc_wrapper.c index 1852141c93..4e9f9f1fe8 100644 --- a/udev_libc_wrapper.c +++ b/udev_libc_wrapper.c @@ -159,7 +159,8 @@ static unsigned long get_id_by_name(const char *uname, const char *dbfile) if (count >= sizeof(line)) continue; - strlcpy(line, bufline, count); + memcpy(line, bufline, count-1); + line[count-1] = '\0'; pos = line; /* get name */ |