diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-10-25 02:04:58 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-10-25 02:04:58 +0000 |
commit | 1a448101092010efd8f8567bbfc99f2fea7d238e (patch) | |
tree | 154a03bdf26e5d3f50f5b02791dfa25260e49ac7 /src | |
parent | 5caf9a56956f55b70d937cea7e135417bada7b25 (diff) | |
download | libcss-1a448101092010efd8f8567bbfc99f2fea7d238e.tar.gz libcss-1a448101092010efd8f8567bbfc99f2fea7d238e.tar.bz2 |
Fix memory corruption. This took far too long to debug. Bah.
svn path=/trunk/libcss/; revision=5628
Diffstat (limited to 'src')
-rw-r--r-- | src/stylesheet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c index 7608b16..9be6d70 100644 --- a/src/stylesheet.c +++ b/src/stylesheet.c @@ -535,7 +535,8 @@ css_error css_stylesheet_rule_append_style(css_stylesheet *sheet, if (cur != NULL) { /* Already have a style, so append to the end of the bytecode */ css_style *temp = sheet->alloc(cur, - cur->length + style->length, sheet->pw); + sizeof(css_style) + cur->length + style->length, + sheet->pw); if (temp == NULL) return CSS_NOMEM; |