chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[PATCH] Fedora udev.rules update
[elogind.git]
/
klibc
/
klibc
/
strlcpy.c
diff --git
a/klibc/klibc/strlcpy.c
b/klibc/klibc/strlcpy.c
index 8b36c43c00cc10e31810fd0a864b25131b370c99..e6937445cd64e5a0a8da91e8cbfeb3924604ad8a 100644
(file)
--- a/
klibc/klibc/strlcpy.c
+++ b/
klibc/klibc/strlcpy.c
@@
-19,7
+19,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;
}