+2005-06-15 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * ftp-basic.c (ftp_pwd): Handle malformed PWD response.
+
2005-06-15 Hrvoje Niksic <hniksic@xemacs.org>
* host.h (ip_address): Remove the trailing comma from the type
return err;
if (*respline == '5')
{
+ err:
xfree (respline);
return FTPSRVERR;
}
and everything following it. */
strtok (respline, "\"");
request = strtok (NULL, "\"");
+ if (!request)
+ /* Treat the malformed response as an error, which the caller has
+ to handle gracefully anyway. */
+ goto err;
/* Has the `pwd' been already allocated? Free! */
xfree_null (*pwd);