mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
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
This commit is contained in:
parent
060be4c62b
commit
39e50cbb48
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user