From: Donncha O'Cearbhaill Date: Fri, 8 May 2015 08:50:13 +0000 (+0100) Subject: Fix segfault in HSPOST command introduce with feature #3523 X-Git-Tag: tor-0.2.7.1-alpha~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc21e8dbcd31bf87e18ae45c530fbfc6a5bfc98;p=thirdparty%2Ftor.git 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. --- diff --git a/src/or/control.c b/src/or/control.c index 780dea58e0..d4e106eb98 100644 --- a/src/or/control.c +++ b/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;