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

[or-cvs] r9216: Okay, now descriptors seem to be buildable. (tor/trunk/src/or)



Author: nickm
Date: 2006-12-29 12:10:29 -0500 (Fri, 29 Dec 2006)
New Revision: 9216

Modified:
   tor/trunk/src/or/router.c
Log:
Okay, now descriptors seem to be buildable.

Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c	2006-12-29 16:49:33 UTC (rev 9215)
+++ tor/trunk/src/or/router.c	2006-12-29 17:10:29 UTC (rev 9216)
@@ -1204,6 +1204,7 @@
     result = policy_write_item(s+written, maxlen-written, tmpe);
     if (result < 0)
       return -1;
+    tor_assert(result == (int)strlen(s+written));
     written += result;
     if (written+2 > maxlen)
       return -1;
@@ -1214,7 +1215,7 @@
     return -1;
 
   /* Sign the directory */
-  strlcat(s+written, "router-signature\n", maxlen-written);
+  strlcpy(s+written, "router-signature\n", maxlen-written);
   written += strlen(s+written);
   s[written] = '\0';
   if (router_get_router_hash(s, digest) < 0)