chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udevd: add initsend
[elogind.git]
/
udev_libc_wrapper.c
diff --git
a/udev_libc_wrapper.c
b/udev_libc_wrapper.c
index 23cb7b43168bc9ff7c3619bcf1440627f67f8b42..1852141c9378c7baa9b389013ed838a90a2d9871 100644
(file)
--- a/
udev_libc_wrapper.c
+++ b/
udev_libc_wrapper.c
@@
-58,7
+58,10
@@
size_t strlcpy(char *dst, const char *src, size_t size)
bytes++;
}
bytes++;
}
- *q = '\0';
+ /* If size == 0 there is no space for a final null... */
+ if (size)
+ *q = '\0';
+
return bytes;
}
return bytes;
}