From 1a448101092010efd8f8567bbfc99f2fea7d238e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 25 Oct 2008 02:04:58 +0000 Subject: Fix memory corruption. This took far too long to debug. Bah. svn path=/trunk/libcss/; revision=5628 --- src/stylesheet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stylesheet.c') 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; -- cgit v1.2.3