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

[or-cvs] r10358: fix a seg fault when my auth dirserver accepted a posted des (tor/trunk/src/or)



Author: arma
Date: 2007-05-26 23:41:09 -0400 (Sat, 26 May 2007)
New Revision: 10358

Modified:
   tor/trunk/src/or/directory.c
Log:
fix a seg fault when my auth dirserver accepted a posted descriptor
(dirserv_add_multiple_descriptors doesn't set msg if there's no
failure.)


Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2007-05-27 03:03:37 UTC (rev 10357)
+++ tor/trunk/src/or/directory.c	2007-05-27 03:41:09 UTC (rev 10358)
@@ -1455,7 +1455,7 @@
 {
   char buf[256];
   if (tor_snprintf(buf, sizeof(buf), "HTTP/1.0 %d %s\r\n\r\n",
-      status, reason_phrase) < 0) {
+      status, reason_phrase ? reason_phrase : "OK") < 0) {
     log_warn(LD_BUG,"status line too long.");
     return;
   }