aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Henty <onepoint@starurchin.org>2009-02-01 14:16:26 -0300
committerJeremy Henty <onepoint@starurchin.org>2009-02-01 14:16:26 -0300
commit3bdea1e9633b97f5c9d60ddb819c38f0f5778e0a (patch)
treef162cb799582d704a4f5d66befe274abf0cd28c1
parentdf866ade99bea5fab0c05dc205588580a7ba71b6 (diff)
Fixed a leak in Html_tag_open_link()
-rw-r--r--ChangeLog1
-rw-r--r--src/html.cc11
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cbf7edb..f2aebe50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);