summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-29 16:49:33 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-29 16:49:33 +0000
commit2741dd5741a27a9e875bfc8713351a7a5de457d4 (patch)
tree6cb02561c8c1b1a3ca5fa613f06bb1607af94bfe /src
parenta77bbe234670c86d1082729002980dbe17f4a5c3 (diff)
downloadtor-2741dd5741a27a9e875bfc8713351a7a5de457d4.tar.gz
tor-2741dd5741a27a9e875bfc8713351a7a5de457d4.zip
r11755@Kushana: nickm | 2006-12-29 11:49:20 -0500
Calculate the length of policy strings correctly again. svn:r9215
Diffstat (limited to 'src')
-rw-r--r--src/or/policies.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index dca16046ab..3af6523386 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -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);