=== modified file 'src/ChangeLog'
--- src/ChangeLog 2012-03-29 18:13:27 +0000
+++ src/ChangeLog 2012-04-01 20:35:28 +0000
@@ -1,3 +1,7 @@
+2012-04-01 Gijs van Tulder
(tiny change)
+
+ * html-url.c: Prevent crash on incomplete STYLE tag.
+
2012-03-29 From: Tim Ruehsen (tiny change)
* utils.c (library): Include .
=== modified file 'src/html-url.c'
--- src/html-url.c 2011-04-24 11:03:48 +0000
+++ src/html-url.c 2012-04-01 16:08:18 +0000
@@ -676,7 +676,8 @@
check_style_attr (tag, ctx);
if (tag->end_tag_p && (0 == strcasecmp (tag->name, "style")) &&
- tag->contents_begin && tag->contents_end)
+ tag->contents_begin && tag->contents_end &&
+ tag->contents_begin <= tag->contents_end)
{
/* parse contents */
get_urls_css (ctx, tag->contents_begin - ctx->text,