cURL / Mailing Lists / curl-library / Single Mail

curl-library

SOCKS proxy without authentication

From: Vincent BRONNER <vbr_at_sxb.bsf.alcatel.fr>
Date: Thu, 22 Jan 2004 16:13:49 +0100

I tried to use libcurl 7.10.8 on Linux with a SOCKS proxy that does not
require any authentication. So I do *not* use the CURLOPT_PROXYUSERPWD
option. And this leads to a segmentation fault in libcurl at runtime.
I found that in "handleSock5Proxy" function in "url.c" source file, the
pointers "proxy_name" and "proxy_password" are set to NULL when the
option CURLOPT_PROXYUSERPWD is not used. And this function does not test
these pointers before trying to get name and password values...
Simple workaround : I set the CURLOPT_PROXYUSERPWD option with an empty
string !

Another different thing : as I was searching for solutions to my problem
in "url.c" source code, I also found the following strange code (line
2820) :
conn->bits.proxy_user_passwd = conn->bits.proxy_user_passwd;
I didn't go further in the analysis, but I think it should be :
conn->bits.proxy_user_passwd = old_conn->bits.proxy_user_passwd;

Thanks for your great work.

Vincent

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-22