[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r9215: Calculate the length of policy strings correctly again. (in tor/trunk: . src/or)



Author: nickm
Date: 2006-12-29 11:49:33 -0500 (Fri, 29 Dec 2006)
New Revision: 9215

Modified:
   tor/trunk/
   tor/trunk/src/or/policies.c
Log:
 r11755@Kushana:  nickm | 2006-12-29 11:49:20 -0500
 Calculate the length of policy strings correctly again.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11755] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/policies.c
===================================================================
--- tor/trunk/src/or/policies.c	2006-12-29 16:31:37 UTC (rev 9214)
+++ tor/trunk/src/or/policies.c	2006-12-29 16:49:33 UTC (rev 9215)
@@ -698,7 +698,7 @@
     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);