From c81e06c77a070b99d2df6d98e47173de4cbdcd7b Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sun, 27 Aug 2006 03:45:38 +0000 Subject: [PATCH] FIX: alloc'ed wrong size for string on restore git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.0@100 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- processor/string.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processor/string.m4 b/processor/string.m4 index ca4e630..450adab 100644 --- a/processor/string.m4 +++ b/processor/string.m4 @@ -37,7 +37,7 @@ define(`PROC_STRING_N_EX', ` IFCALC(`xc_calc_string_n(processor, ISTYPE, (void *) $2, `$3' IFASSERT(`, __LINE__'));') IFSTORE(`$1 = (STRTYPE *) xc_store_string_n(processor, ISTYPE, (char *) $2, `$3' IFASSERT(`, __LINE__'));') IFRESTORE(` - ALLOC(`$1', `STRTYPE', `sizeof(STRTYPE) * ($3)') + ALLOC(`$1', `STRTYPE', `($3)') memcpy($1, $2, sizeof(STRTYPE) * ($3)); ') FIXPOINTER_EX(`STRTYPE', `$1')