mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix buf_t advancement in fetch_buf_from_socks
We pullup 512 bytes of input to make sure that at least one SOCKS message ends up in head of linked list
This commit is contained in:
@@ -142,7 +142,7 @@ test_socks_4_bad_arguments(void *ptr)
|
||||
get_options()->SafeSocks),
|
||||
OP_EQ, -1);
|
||||
buf_clear(buf);
|
||||
expect_log_msg_containing("Port or DestIP is zero."); // !!!
|
||||
expect_log_msg_containing("Port or DestIP is zero.");
|
||||
mock_clean_saved_logs();
|
||||
|
||||
/* Try with 0 port */
|
||||
@@ -164,7 +164,7 @@ test_socks_4_bad_arguments(void *ptr)
|
||||
tt_int_op(fetch_from_buf_socks(buf, socks, 1, 0),
|
||||
OP_EQ, -1);
|
||||
buf_clear(buf);
|
||||
expect_log_msg_containing("user name too long; rejecting.");
|
||||
expect_log_msg_containing("socks4: parsing failed - invalid request.");
|
||||
mock_clean_saved_logs();
|
||||
|
||||
/* Try with 2000-byte hostname */
|
||||
|
||||
Reference in New Issue
Block a user