From a3788d5c9d634792a7f95ea090ee0a3c1475b292 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 12 Nov 2004 21:14:51 +0000 Subject: Fix argument to strncpy. svn:r2824 --- src/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/util.c') diff --git a/src/common/util.c b/src/common/util.c index ced770e57..d62be23e6 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -171,7 +171,7 @@ char *tor_strndup(const char *s, size_t n) { * this function gets called a whole lot, and platform strncpy is * much faster than strlcpy when strlen(s) is much longer than n. */ - strncpy(dup, s, n+1); + strncpy(dup, s, n); dup[n]='\0'; return dup; } -- cgit v1.2.3