cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: [PATCH] Missing NULL-allocation check for prevpath in ftp.c

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 1 Apr 2009 14:17:17 +0200 (CEST)

On Wed, 1 Apr 2009, Andre Guibert de Bruet wrote:

> I found an instance in lib/ftp.c where the returned pointer from strdup() is
> not being properly checked. It is presently blindly being passed as a
> parameter to infof(), which would likely fault if strdup() were to return a
> NULL pointer.
>
> I am not sure what the best failure mode is for this particular case, in
> terms of recovering from the error at the FTP level, but the attached patch
> fixes the crash.

Thanks, I applied and committed. Possibly it should return a failure but since
it can survive the strdup() failure I guess this is fine.

-- 
  / daniel.haxx.se
Received on 2009-04-01

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET