tag 563872 patch
thanks

The attached patch fixes it. wget was trying to copy a string referenced by a 
NULL pointer.

Now the output is:

--2010-01-27 19:02:20--  http://localhost:1234/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:1234... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:1234... connected.
HTTP request sent, awaiting response... -1
2010-01-27 19:02:20 ERROR -1: Malformed status line.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
--- wget-1.12.orig/src/http.c
+++ wget-1.12/src/http.c
@@ -1829,7 +1829,8 @@
   /* Check for status line.  */
   message = NULL;
   statcode = resp_status (resp, &message);
-  hs->message = xstrdup (message);
+  if (message)
+    hs->message = xstrdup (message);
   if (!opt.server_response)
     logprintf (LOG_VERBOSE, "%2d %s\n", statcode,
                message ? quotearg_style (escape_quoting_style, message) : "");

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to