X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_libc_wrapper.c;h=4e9f9f1fe87108625ae539fbf4823a8a1b061ed4;hb=b0f6529556e71186b186cbc295ad7e21e2288887;hp=1852141c9378c7baa9b389013ed838a90a2d9871;hpb=12340f41085c5ab9f5f049eab640835e39de8286;p=elogind.git diff --git a/udev_libc_wrapper.c b/udev_libc_wrapper.c index 1852141c9..4e9f9f1fe 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 */