[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix segfault in HSPOST command introduce with feature #3523
commit 4fc21e8dbcd31bf87e18ae45c530fbfc6a5bfc98
Author: Donncha O'Cearbhaill <donncha@xxxxxxxxxx>
Date: Fri May 8 09:50:13 2015 +0100
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.
---
src/or/control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/or/control.c b/src/or/control.c
index 780dea5..d4e106e 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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits