mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
r11755@Kushana: nickm | 2006-12-29 11:49:20 -0500
Calculate the length of policy strings correctly again. svn:r9215
This commit is contained in:
parent
a77bbe2346
commit
2741dd5741
@ -698,7 +698,7 @@ policy_write_item(char *buf, size_t buflen, addr_policy_t *policy)
|
||||
if (written+4 > buflen)
|
||||
return -1;
|
||||
strlcat(buf+written, ":*", buflen-written);
|
||||
written += 3;
|
||||
written += 2;
|
||||
} else if (policy->prt_min == policy->prt_max) {
|
||||
/* There is only one port; write ":80". */
|
||||
result = tor_snprintf(buf+written, buflen-written, ":%d", policy->prt_min);
|
||||
|
Loading…
Reference in New Issue
Block a user