Skip to content
Snippets Groups Projects
Commit 895b6789 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

scan-build: get_proxy_addrport should always set its outputs

When get_proxy_addrport returned PROXY_NONE, it would leave
addr/port unset. This is inconsistent, and could (if we used the
function in a stupid way) lead to undefined behavior. Bugfix on
5b050a9b, though I don't think it affects tor-as-it-is.
parent 7cd9520b
No related branches found
No related tags found
No related merge requests found
......@@ -4814,6 +4814,8 @@ get_proxy_addrport(tor_addr_t *addr, uint16_t *port, int *proxy_type,
}
}
tor_addr_make_unspec(addr);
*port = 0;
*proxy_type = PROXY_NONE;
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment