[or-cvs] r9370: Yes, apparently saying strcpy in front of openbsd is like sa (in tor/trunk: . src/common)
nickm at seul.org
nickm at seul.org
Thu Jan 18 19:37:23 UTC 2007
Author: nickm
Date: 2007-01-18 14:37:23 -0500 (Thu, 18 Jan 2007)
New Revision: 9370
Modified:
tor/trunk/
tor/trunk/src/common/util.c
Log:
r9776 at 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.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r9776] on 96637b51-b116-0410-a10e-9941ebb49b64
Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c 2007-01-18 03:42:45 UTC (rev 9369)
+++ tor/trunk/src/common/util.c 2007-01-18 19:37:23 UTC (rev 9370)
@@ -284,13 +284,13 @@
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;
}
More information about the tor-commits
mailing list