aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-12 21:14:51 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-12 21:14:51 +0000
commita3788d5c9d634792a7f95ea090ee0a3c1475b292 (patch)
tree93cfd1b7c6d1e65485e65c228cb7056d7c59ed70 /src/common/util.c
parenta8f9ba91db3d326b9b6ff67c35e7b52ae11d08c4 (diff)
downloadtor-a3788d5c9d634792a7f95ea090ee0a3c1475b292.tar
tor-a3788d5c9d634792a7f95ea090ee0a3c1475b292.tar.gz
Fix argument to strncpy.
svn:r2824
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
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;
}