]> sjero.net Git - wget/commitdiff
[svn] Don't crash on <meta http-equiv=refresh>.
authorhniksic <devnull@localhost>
Fri, 1 Feb 2002 03:34:31 +0000 (19:34 -0800)
committerhniksic <devnull@localhost>
Fri, 1 Feb 2002 03:34:31 +0000 (19:34 -0800)
Published in <sxshep1q3je.fsf@florida.arsdigita.de>.

src/ChangeLog
src/html-url.c

index 1660fd81271eed2d36a4c8ca07e5bb2164e2792b..0586a2ccbba3d8a242aa66e95c8be02af7a68c70 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-01  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * html-url.c (tag_handle_meta): Don't crash on <meta
+       http-equiv=refresh> where content is missing.
+
 2002-01-31  Herold Heiko  <Heiko.Herold@previnet.it>
 
        * ftp-basic.c, host.c: don't include sys/socket.h, arpa/inet.h,
index 74703ce6da932bd20782ad8dcdcede764437d242..fdafe0f1c46d19caf92f136f38f40da80fd87825 100644 (file)
@@ -521,10 +521,13 @@ tag_handle_meta (int tagid, struct taginfo *tag, struct map_context *ctx)
         get to the URL.  */
 
       struct urlpos *entry;
-
       int attrind;
-      char *p, *refresh = find_attr (tag, "content", &attrind);
       int timeout = 0;
+      char *p;
+
+      char *refresh = find_attr (tag, "content", &attrind);
+      if (!refresh)
+       return;
 
       for (p = refresh; ISDIGIT (*p); p++)
        timeout = 10 * timeout + *p - '0';