[project @ 2006-02-05 22:22:35 by jmb]

Fix bad read

svn path=/import/netsurf/; revision=2057
This commit is contained in:
John Mark Bell 2006-02-05 22:22:35 +00:00
parent 4c90aad659
commit 9a35230e88

View File

@ -1386,10 +1386,13 @@ bool css_match_detail(const struct css_selector *detail,
free(word);
if (!s)
break;
word = s + (strlen(s) - detail->data2_length);
if (s && strncasecmp(detail->data2, word,
detail->data2_length) == 0)
match = true;
length = strlen(s);
if (detail->data2_length <= length) {
word = s + (length - detail->data2_length);
if (s && strncasecmp(detail->data2, word,
detail->data2_length) == 0)
match = true;
}
break;
case CSS_SELECTOR_ATTRIB_SUB: