New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
socks: fix expected length of SOCKS5 reply #5527
Conversation
Commit 4a4b63d forgot to initialize the expected SOCKS5 reply length, and neither did it set it to the correct value of 10 when the reply ATYP is X'01'. This results in erroneously expecting more bytes when the request length is greater than the reply length (e.g., when remotely resolving the hostname).
Alternatively, set the length when Lines 928 to 937 in a00668d
Otherwise, Lines 944 to 952 in a00668d
|
I think would prefer that for greater redability, and then do a final |
On a second thought, I agree that would be the correct fix. Because the original patch in the pull request set |
Yes, very good point! |
Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the reply ATYP is X'01'. This resulted in erroneously expecting more bytes when the request length is greater than the reply length (e.g., when remotely resolving the hostname).
socks: fix expected length of SOCKS5 reply
I have drafted a v2 patch in af1a5f5. |
Thanks! |
Commit 4a4b63d forgot to initialize the expected SOCKS5 reply length, and neither did it set it to the correct value of 10 when the reply ATYP is X'01'. This results in erroneously expecting more bytes when the request length is greater than the reply length (e.g., when remotely resolving the hostname).