Re: FTP "SYST" NULL dereferencing crash (found by someone else)

[email protected] (Steven M. Schweda) Tue, 19 Dec 2006 16:37:04 -0600 (CST)
Newsgroups gmane.comp.web.wget.patches
Message-ID <06121916370476_2020028F__30488.4097110063$1166568163$gmane$org@antinode.org>
From: Ulf Harnhammar <[email protected]>

+  if (request == NULL)
+    {
+      xfree (respline);
+      return FTPSRVERR;
+    }

   Well, yeah, if you prefer returning an error code to trying a little
harder.  I prefer my change:

    if (request == NULL)
      *server_type = ST_OTHER;

Why punish the user when the FTP server behaves badly?

------------------------------------------------------------------------

   Steven M. Schweda               sms@antinode-org
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547