summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-06 08:49:57 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-06 08:49:57 -0500
commit6d6643298dfda1b146c635e3858faec7e9c9631c (patch)
tree2589f73ac8d7058bda1c87cc178171f052ad4df0 /src
parent184a2dbbdd27f958f5ac290fe030d1fac2959157 (diff)
downloadtor-6d6643298dfda1b146c635e3858faec7e9c9631c.tar.gz
tor-6d6643298dfda1b146c635e3858faec7e9c9631c.zip
Don't crash on malformed EXTENDCIRCUIT.
Fixes 14116; bugfix on ac68704f in 0.2.2.9-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/or/control.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 9378f38f40..bdd91fc4be 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2451,6 +2451,14 @@ handle_control_extendcircuit(control_connection_t *conn, uint32_t len,
goto done;
}
+ if (smartlist_len(args) < 2) {
+ connection_printf_to_buf(conn,
+ "512 syntax error: not enough arguments.\r\n");
+ SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));
+ smartlist_free(args);
+ goto done;
+ }
+
smartlist_split_string(router_nicknames, smartlist_get(args,1), ",", 0, 0);
SMARTLIST_FOREACH(args, char *, cp, tor_free(cp));