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] klibc: strlcpy/strlcat - don't alter destination if size == 0
[elogind.git]
/
klibc
/
klibc
/
strlcat.c
diff --git
a/klibc/klibc/strlcat.c
b/klibc/klibc/strlcat.c
index f397857e76362f3badc9763f14aa06ba3779a677..fdd72ac392c5b910f19c5e66ecc6227f1577e41a 100644
(file)
--- a/
klibc/klibc/strlcat.c
+++ b/
klibc/klibc/strlcat.c
@@
-26,7
+26,8
@@
size_t strlcat(char *dst, const char *src, size_t size)
bytes++;
}
- *q = '\0';
+ if (size)
+ *q = '\0';
return bytes;
}