瀏覽代碼

Fix segfault in HSPOST command introduce with feature #3523

Checking if node->rs->is_hs_dir when the router_status for the node does
not exist results in a segfault. This bug is not in any released Tor.
Donncha O'Cearbhaill 9 年之前
父節點
當前提交
4fc21e8dbc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/or/control.c

+ 1 - 1
src/or/control.c

@@ -3452,7 +3452,7 @@ handle_control_hspost(control_connection_t *conn,
         const char *server = arg + strlen(opt_server);
         const node_t *node = node_get_by_hex_id(server);
 
-        if (!node) {
+        if (!node || !node->rs) {
           connection_printf_to_buf(conn, "552 Server \"%s\" not found\r\n",
                                    server);
           goto done;