diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-15 10:05:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-15 10:05:19 -0400 |
commit | 521cb581877be404626446aa558cade649c13f03 (patch) | |
tree | 8b4278b981f71932ee18469ae859d09659b4dac2 /src/or | |
parent | 92cba63459c0b3cac59f6daa75506a967e515907 (diff) | |
parent | 5905a0b2dbcff8bd07e179750f53a8f010b4a5e0 (diff) | |
download | tor-521cb581877be404626446aa558cade649c13f03.tar.gz tor-521cb581877be404626446aa558cade649c13f03.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/control.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c index 976997dcf0..ec018ffc23 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2530,6 +2530,10 @@ handle_control_setcircuitpurpose(control_connection_t *conn, { const char *purp = find_element_starting_with(args,1,"PURPOSE="); + if (!purp) { + connection_write_str_to_buf("552 No purpose given\r\n", conn); + goto done; + } new_purpose = circuit_purpose_from_string(purp); if (new_purpose == CIRCUIT_PURPOSE_UNKNOWN) { connection_printf_to_buf(conn, "552 Unknown purpose \"%s\"\r\n", purp); |