Re: [PATCH] Missing NULL-allocation check for prevpath in ftp.c
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.seReceived on 2009-04-01