chiark / gitweb /
Update the gentoo rule file
[elogind.git] / udev_libc_wrapper.c
index 23cb7b43168bc9ff7c3619bcf1440627f67f8b42..1852141c9378c7baa9b389013ed838a90a2d9871 100644 (file)
@@ -58,7 +58,10 @@ size_t strlcpy(char *dst, const char *src, size_t size)
                bytes++;
        }
 
-       *q = '\0';
+       /* If size == 0 there is no space for a final null... */
+       if (size)
+               *q = '\0';
+
        return bytes;
 }