summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-01-18 19:37:23 +0000
committerNick Mathewson <nickm@torproject.org>2007-01-18 19:37:23 +0000
commit39e50cbb48f65ba7e75f5aed40d2a19c0255219d (patch)
tree8a3c2f3c358ce8b89d31aaa49f5606746e255032 /src/common
parent060be4c62bc1c415d9c328cd005bf9fa7edd99fc (diff)
downloadtor-39e50cbb48f65ba7e75f5aed40d2a19c0255219d.tar.gz
tor-39e50cbb48f65ba7e75f5aed40d2a19c0255219d.zip
r9776@totoro: nickm | 2007-01-18 14:37:01 -0500
Yes, apparently saying strcpy in front of openbsd is like saying "intellectual property" in front of RMS. They both have a point, I guess, even though they extend it to contexts where it is completely irrelevant. svn:r9370
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 1a205eb21f..136123baf1 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -284,13 +284,13 @@ tor_strpartition(char *dest, size_t dest_len,
remaining -= n;
if (remaining < 0) {
if (rule == ALWAYS_TERMINATE)
- strcpy(destp+n+remaining,insert);
+ strncpy(destp+n+remaining,insert,len_ins+1);
break;
} else if (remaining == 0 && rule == NEVER_TERMINATE) {
*(destp+n) = '\0';
break;
}
- strcpy(destp+n, insert);
+ strncpy(destp+n, insert, len_ins+1);
s += n;
destp += n+len_ins;
}