summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dlink.c b/dlink.c
index 3efa94b7..69aa7aa3 100644
--- a/dlink.c
+++ b/dlink.c
@@ -63,7 +63,7 @@ char *dl_strndup(char *s, int l)
if (s == NULL)
return NULL;
n = dl_newv(char, l+1);
- strncpy(n, s, l);
+ strncpy(n, s, l+1);
n[l] = 0;
return n;
}