curl-users
curl crashes on SOCKSv4/4a proxy response
Date: Wed, 9 Mar 2005 13:57:54 -0800 (PST)
Hi,
>From what I've read in the documents, libcurl only
supports HTTP and SOCKS5 type proxies. I am currently
using libcurl version 7.13.0 with ssl support built in
on WinXP w/SP2.
I have tested libcurl out on both of the supported
proxies and it worked great, but when I decided to see
what response I'd receive when targetting a SOCKS4/4A
proxy my application crashed. From there I fired up
the debugger and stepped through the code and found
out the 'METHOD' field in the response from the server
was 0xFF, which is 'NO ACCEPTABLE METHODS'. I would
have expected that the 'VER' would have been invalid (
4 not 5 ), but it wasn't. The crash occurs in url.c
function handleSock5Proxy() line 1834, the conditional
'if (proxy_name[0] == 0)', I believe should just be
'if(!proxy_name)', since proxy_name in this case is
NULL and accessing proxy_name[0] is invalid on a NULL
ptr.
A free downloadable proxy server was used -
'FreeProxy' downloadable at
http://www.softpedia.com/get/Internet/Servers/Proxy-Servers/FreeProxy.shtml.
I verified the SOCKS version setup on the pc each time
by using the 'Advanced Administrative Tools' proxy
analyzer, trial version accessible at
http://www.globalshareware.com/Utilities/Network/Advanced-Administrative-Tools-download.htm.
So I guess my questions are:
1) Why would the 'VER' return as 0x05 and not 0x04?
2) Should the conditional be changed to check if the
pointer is NULL first before accessing the subzero
element?
Thanks in advance to all.
Dave
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2005-03-09