hack to prevent segfault when href is empty
authorCarsten Schurig <Carsten.Schurig@web.de>
Fri, 18 Jan 2002 09:11:14 +0000 (09:11 +0000)
committerCarsten Schurig <Carsten.Schurig@web.de>
Fri, 18 Jan 2002 09:11:14 +0000 (09:11 +0000)
src/html.c

index fec2ea1651eafeb7ed678ce2259e769bc43e7077..f3c2f0b55da76b8691c63586f254ec154cb0eea1 100644 (file)
@@ -552,6 +552,7 @@ static HTMLState html_parse_tag(HTMLParser *parser)
                                /* the next token is the url, between double
                                 * quotes */
                                char* url = strtok(NULL, "\"");
+                               if (!url) break;
                                html_append_str(parser, url, strlen(url));
                                html_append_char(parser, ' ');
                                /* start enforcing html link */