diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-10-14 15:31:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-10-14 15:31:52 -0400 |
commit | 2dccef0eb490fa7d8fabc0d93e37d6635910f174 (patch) | |
tree | 65138098218cb4b11ffcbd3f6ac90501c45e2e99 /src/core/proto | |
parent | 2c5c17510acf0cbd0eeb874a2f4c62203bf9392f (diff) | |
parent | 6925b61cfdf50a5686de02645b04b269c031f05d (diff) | |
download | tor-2dccef0eb490fa7d8fabc0d93e37d6635910f174.tar.gz tor-2dccef0eb490fa7d8fabc0d93e37d6635910f174.zip |
Merge branch 'bug27772_squashed'
Diffstat (limited to 'src/core/proto')
-rw-r--r-- | src/core/proto/proto_socks.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/proto/proto_socks.c b/src/core/proto/proto_socks.c index ccf96f7814..e23da7730b 100644 --- a/src/core/proto/proto_socks.c +++ b/src/core/proto/proto_socks.c @@ -353,6 +353,7 @@ process_socks5_methods_request(socks_request_t *req, int have_user_pass, { socks_result_t res = SOCKS_RESULT_DONE; socks5_server_method_t *trunnel_resp = socks5_server_method_new(); + tor_assert(trunnel_resp); socks5_server_method_set_version(trunnel_resp, SOCKS_VER_5); @@ -478,6 +479,7 @@ process_socks5_userpass_auth(socks_request_t *req) socks_result_t res = SOCKS_RESULT_DONE; socks5_server_userpass_auth_t *trunnel_resp = socks5_server_userpass_auth_new(); + tor_assert(trunnel_resp); if (req->socks_version != SOCKS_VER_5) { res = SOCKS_RESULT_INVALID; @@ -742,7 +744,7 @@ handle_socks_message(const uint8_t *raw_data, size_t datalen, res = SOCKS_RESULT_MORE_EXPECTED; goto end; } else if (req->socks_version != SOCKS_VER_5) { - int have_user_pass, have_no_auth; + int have_user_pass=0, have_no_auth=0; res = parse_socks5_methods_request(raw_data, req, datalen, &have_user_pass, &have_no_auth, @@ -869,6 +871,7 @@ socks_request_set_socks5_error(socks_request_t *req, socks5_reply_status_t reason) { socks5_server_reply_t *trunnel_resp = socks5_server_reply_new(); + tor_assert(trunnel_resp); socks5_server_reply_set_version(trunnel_resp, SOCKS_VER_5); socks5_server_reply_set_reply(trunnel_resp, reason); |