mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
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
5b050a9b0
, though I don't think it affects tor-as-it-is.
This commit is contained in:
parent
7cd9520ba9
commit
895b6789e8
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue