diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/html.cc | 11 |
2 files changed, 8 insertions, 4 deletions
@@ -32,6 +32,7 @@ dillo-2.1 - Cleaned up and normalized D_SUN_LEN usage. - Fixed incorrect use of VOIDP2INT in Dialog_user_password_cb(). - Ensure that the dlib dStr* functions are used everywhere. + - Fixed a leak in Html_tag_open_link(). Patches: Jeremy Henty +- Implemented Basic authentication! Patch: Jeremy Henty, Jorge Arellano Cid diff --git a/src/html.cc b/src/html.cc index 20685080..769379a5 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2850,11 +2850,10 @@ static void Html_tag_open_link(DilloHtml *html, const char *tag, int tagsize) return; /* CSS stylesheet link */ - if ((!(attrbuf = a_Html_get_attr(html, tag, tagsize, "rel")) || - dStrcasecmp(attrbuf, "stylesheet")) || - (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "href")) || - !(url = a_Html_url_new(html, attrbuf, NULL, 0)))) + if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "rel")) || + dStrcasecmp(attrbuf, "stylesheet")) return; + /* IMPLIED attributes? */ if (((attrbuf = a_Html_get_attr(html, tag, tagsize, "type")) && dStrcasecmp(attrbuf, "text/css")) || @@ -2862,6 +2861,10 @@ static void Html_tag_open_link(DilloHtml *html, const char *tag, int tagsize) !dStristr(attrbuf, "screen") && dStrcasecmp(attrbuf, "all"))) return; + if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "href")) || + !(url = a_Html_url_new(html, attrbuf, NULL, 0))) + return; + MSG(" Html_tag_open_link(): URL=%s\n", URL_STR(url)); _MSG(" repush after HEAD=%d\n", html->repush_after_head); |