socks5: please static code analyzer
authorDaniel Stenberg <daniel@haxx.se>
Sat, 24 Apr 2010 10:40:00 +0000 (12:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 24 Apr 2010 10:40:00 +0000 (12:40 +0200)
commit7fb7f2413194e7f7a21716f86c765ad47c66fadf
tree015263dba2b1691259cd8fface43798c1a806b1f
parent5b40c11c2f3db2f4de4969ebabca45b42ad405cc
socks5: please static code analyzer

Make sure we don't call memcpy() if the argument is NULL even
though we also passed a zero length then, as the clang analyzer
whined and we want to limit warnings (even false positives) when
they're this easy to fix.

The change of (char) to (unsigned char) will fix long user names
and passwords on systems that have the char type signed by
default.
lib/socks.c