X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp-basic.c;h=24026e194d89f0bff978e504ded1ab58189dea07;hp=851f506884b9a0817770151af7898e7c595b1434;hb=4d7c5e087b2bc82c9f503dff003916d1047903ce;hpb=1c7493b83ed8cecbbf1f70ef6bf834f94c5fcd43 diff --git a/src/ftp-basic.c b/src/ftp-basic.c index 851f5068..24026e19 100644 --- a/src/ftp-basic.c +++ b/src/ftp-basic.c @@ -1,11 +1,11 @@ /* 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. GNU Wget is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or +the Free Software Foundation; either version 3 of the License, or (at your option) any later version. GNU Wget is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Wget; if not, write to the Free Software Foundation, Inc., -51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +along with Wget. If not, see . In addition, as a special exception, the Free Software Foundation gives permission to link the code of its release of Wget with the @@ -1038,7 +1037,9 @@ ftp_syst (int csock, enum stype *server_type) 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;