diff options
Diffstat (limited to 'libgcompat/string.c')
-rw-r--r-- | libgcompat/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcompat/string.c b/libgcompat/string.c index a164ab2..162d94c 100644 --- a/libgcompat/string.c +++ b/libgcompat/string.c @@ -247,7 +247,7 @@ char *__strncat_chk(char *dest, const char *src, size_t n, size_t destlen) assert(dest != NULL); assert(src != NULL); - total = strnlen(dest, destlen) + n + 1; + total = strnlen(dest, destlen) + strnlen(src, destlen) + 1; assert(destlen >= total); if (dest < src) { assert(dest + total <= src); |