[or-cvs] r13605: if you thought r13604 was a kludge, how about this. (tor/trunk/src/or)

arma at seul.org arma at seul.org
Wed Feb 20 00:30:42 UTC 2008


Author: arma
Date: 2008-02-19 19:30:41 -0500 (Tue, 19 Feb 2008)
New Revision: 13605

Modified:
   tor/trunk/src/or/rendcommon.c
Log:
if you thought r13604 was a kludge, how about this.


Modified: tor/trunk/src/or/rendcommon.c
===================================================================
--- tor/trunk/src/or/rendcommon.c	2008-02-20 00:11:52 UTC (rev 13604)
+++ tor/trunk/src/or/rendcommon.c	2008-02-20 00:30:41 UTC (rev 13605)
@@ -510,7 +510,7 @@
     base16_encode(ipoint+1, HEX_DIGEST_LEN+1,
                   intro->extend_info->identity_digest,
                   DIGEST_LEN);
-    tor_assert(buflen >= cp-*str_out); /* XXX021 This assert is a kludge. */
+    tor_assert(buflen + *str_out >= cp); /* XXX021 This assert is a kludge. */
     strlcpy(cp, ipoint, buflen-(cp-*str_out));
     cp += strlen(ipoint)+1;
   }



More information about the tor-commits mailing list