summaryrefslogtreecommitdiff
path: root/support/vsnprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/vsnprintf.c')
-rw-r--r--support/vsnprintf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/support/vsnprintf.c b/support/vsnprintf.c
index a2dfb4e..6a54d27 100644
--- a/support/vsnprintf.c
+++ b/support/vsnprintf.c
@@ -86,8 +86,7 @@ mcleanup(str, n, p)
size_t n;
char *p;
{
- strncpy(str, p, n-1);
- str[n-1] = '\0';
+ g_strlcpy(str, p, n);
if (mprotect((caddr_t)(p + n + EXTRABYTES), pgsize,
PROT_READ|PROT_WRITE|PROT_EXEC) == -1)
mprotect((caddr_t)(p + n + EXTRABYTES), pgsize,