[PATCH] Missing NULL-allocation check for prevpath in ftp.c
Date: Wed, 1 Apr 2009 00:03:46 -0400
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.
/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Managing Partner * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
- application/octet-stream attachment: prevpath.patch