mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Merge branch 'bug5796_022_squashed' into maint-0.2.2
This commit is contained in:
commit
5905a0b2db
4
changes/bug5796
Normal file
4
changes/bug5796
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes (controller):
|
||||||
|
- Fix a NULL-pointer derefernce on a badly formed
|
||||||
|
SETCIRCUITPURPOSE command. Found by mikeyc. Fixes bug 5796;
|
||||||
|
bugfix on 0.2.2.9-alpha.
|
@ -2389,6 +2389,10 @@ handle_control_setcircuitpurpose(control_connection_t *conn,
|
|||||||
|
|
||||||
{
|
{
|
||||||
const char *purp = find_element_starting_with(args,1,"PURPOSE=");
|
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);
|
new_purpose = circuit_purpose_from_string(purp);
|
||||||
if (new_purpose == CIRCUIT_PURPOSE_UNKNOWN) {
|
if (new_purpose == CIRCUIT_PURPOSE_UNKNOWN) {
|
||||||
connection_printf_to_buf(conn, "552 Unknown purpose \"%s\"\r\n", purp);
|
connection_printf_to_buf(conn, "552 Unknown purpose \"%s\"\r\n", purp);
|
||||||
|
Loading…
Reference in New Issue
Block a user