cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problems

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 15 Aug 2008 11:24:37 -0700

On Fri, Aug 15, 2008 at 06:39:22PM +0800, jianghao wrote:
> Hello,
> These days I had some trouble when testing my staff with curl, I've solved
> them,but I don't know if my solution is correct and whether it will cause other
> problems future.Please help me.
> 1. At base64.c:Curl_base64_encode,line 162:
> if(0 == insize)
> insize = strlen(indata);
> It caused a segment fault when indata is NULL and insize = 0, I think
> it should be changed to:
> if(0 == insize)
> insize = (NULL == indata) ? 0 : strlen(indata);

Curl_base64_encode shouldn't ever be called with a NULL indata. This patch
points to a problem in the caller. In which context is this pointer NULL?

> 2.When doing ntlm authentication, curl will get into infinite loops
> (although it will stop after about 50 repeats) if server always close the
> connection after sending the response with the NTLM challenge string

My understanding is that NTLM authenticates the connection, not the session,
so it would be impossible to use NTLM if the server closes the connection.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-08-15