1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Fixed segfault if response text is missing

This commit is contained in:
mtortonesi 2007-01-09 06:37:03 -08:00
parent 336c0de301
commit bd7f4ef701
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
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> 2006-12-29 Gisle Vanem <giva@bgnett.no>
* mswindows.c: Avoid a warning if 'ws_hangup()' is unused. * mswindows.c: Avoid a warning if 'ws_hangup()' is unused.

View File

@ -1,5 +1,5 @@
/* Basic FTP routines. /* 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. This file is part of GNU Wget.
@ -1038,7 +1038,9 @@ ftp_syst (int csock, enum stype *server_type)
first word of the server response)? */ first word of the server response)? */
request = strtok (NULL, " "); request = strtok (NULL, " ");
if (!strcasecmp (request, "VMS")) if (request == NULL)
*server_type = ST_OTHER;
else if (!strcasecmp (request, "VMS"))
*server_type = ST_VMS; *server_type = ST_VMS;
else if (!strcasecmp (request, "UNIX")) else if (!strcasecmp (request, "UNIX"))
*server_type = ST_UNIX; *server_type = ST_UNIX;