+2007-01-09 Steven M. Schweda <sms@antinode.org>
+
+ * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.
+
2006-12-29 Gisle Vanem <giva@bgnett.no>
* mswindows.c: Avoid a warning if 'ws_hangup()' is unused.
/* Basic FTP routines.
- Copyright (C) 1996-2006 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007 Free Software Foundation, Inc.
This file is part of GNU Wget.
first word of the server response)? */
request = strtok (NULL, " ");
- if (!strcasecmp (request, "VMS"))
+ if (request == NULL)
+ *server_type = ST_OTHER;
+ else if (!strcasecmp (request, "VMS"))
*server_type = ST_VMS;
else if (!strcasecmp (request, "UNIX"))
*server_type = ST_UNIX;