Browse Source

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.)


svn:r10358

Roger Dingledine 18 years ago
parent
commit
e13bf01a9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/directory.c

+ 1 - 1
src/or/directory.c

@@ -1455,7 +1455,7 @@ write_http_status_line(dir_connection_t *conn, int status,
 {
 {
   char buf[256];
   char buf[256];
   if (tor_snprintf(buf, sizeof(buf), "HTTP/1.0 %d %s\r\n\r\n",
   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.");
     log_warn(LD_BUG,"status line too long.");
     return;
     return;
   }
   }