In socks5_connect(), do not try to print a negative number ...
authorFabian Keil <fk@fabiankeil.de>
Wed, 29 Feb 2012 19:35:11 +0000 (19:35 +0000)
committerFabian Keil <fk@fabiankeil.de>
Wed, 29 Feb 2012 19:35:11 +0000 (19:35 +0000)
commit534dba7e665aeec58782c2d823eb23367b0446cf
treea4b994fc97299e0c6f5791c59d717cbeebdf2277
parent319b9c0b6a9badebc1883e85c08a6d9ae34e8c5a
In socks5_connect(), do not try to print a negative number ...

... of socks response bytes if the read() for the socks5
negotiation failed completely.

It's an API violation and can trigger an assert() in
debug builds with "debug 2" enabled. Except for the
assert(), log_error() already handled negative %N values
gracefully so this commit only makes a difference for
debug builds.
gateway.c