소스 검색

Initialize some locals in socks5 parsing code.

These confused GCC LTO, which thought they might be used
uninitialized.  I'm pretty sure that as long as 'res' indicates
success, they will always be set to something, but let's unconfuse
the compiler in any case.
Nick Mathewson 8 년 전
부모
커밋
dddecee291
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/proto/proto_socks.c

+ 1 - 1
src/core/proto/proto_socks.c

@@ -744,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,