diff options
author | Alex Dupre <ale@FreeBSD.org> | 2009-09-18 14:42:56 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2009-09-18 14:42:56 +0000 |
commit | c631e05e718d77ca01aa8c0788585a306f32fa95 (patch) | |
tree | 69ce2fcf1ea5bdea3843e914d0f470236e1e3ff6 /www | |
parent | de58649982982f3b980f20415a7ad918a104922b (diff) | |
download | ports-c631e05e718d77ca01aa8c0788585a306f32fa95.tar.gz ports-c631e05e718d77ca01aa8c0788585a306f32fa95.zip |
Notes
Diffstat (limited to 'www')
-rw-r--r-- | www/php-templates/files/patch-tmpl_lib.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/www/php-templates/files/patch-tmpl_lib.c b/www/php-templates/files/patch-tmpl_lib.c new file mode 100644 index 000000000000..56b4cd46d269 --- /dev/null +++ b/www/php-templates/files/patch-tmpl_lib.c @@ -0,0 +1,29 @@ +--- tmpl_lib.c.orig 2009-09-18 16:40:45.000000000 +0200 ++++ tmpl_lib.c 2009-09-18 16:41:09.000000000 +0200 +@@ -214,7 +214,7 @@ + buf_alloc = TMPL_MAX_TAG_LEN+4; + buf = (uchar*)emalloc(buf_alloc); + /* Searching algorythm will require larger buffer */ +- ZV(tmpl->original) = (char*)erealloc(ZV(tmpl->original), ++ Z_STRVAL_P(tmpl->original) = (char*)erealloc(ZV(tmpl->original), + ZL(tmpl->original) + MAX( + ZL(tmpl->tag_left), MAX( + ZL(tmpl->tag_right), MAX( +@@ -697,7 +697,7 @@ + /* Make a recursive call */ + if(buf_alloc <= (unsigned)(ZL(path)+1+ZL(tag->name)+1)) { + while(buf_alloc <= (unsigned)(ZL(path)+1+ZL(tag->name)+1)) buf_alloc <<= 1; +- ZV(new_path) = (char*)erealloc(ZV(new_path), buf_alloc); ++ Z_STRVAL_P(new_path) = (char*)erealloc(ZV(new_path), buf_alloc); + } + sprintf(ZV(new_path), (1 == ZL(path) && '/' == ZV(path)[0]) ? "%s%s" : "%s/%s", ZV(path), ZV(tag->name)); + ZL(new_path) = ZL(path) + ZL(tag->name) + ((1 == ZL(path) && '/' == ZV(path)[0]) ? 0 : 1); +@@ -877,7 +877,7 @@ + } else p = key; + ZVAL_STRINGL(new_value, p, (TMPL_LONG == mod) ? key_len-1 : key_len-1-(p-key), 1); + if((TMPL_TAG | TMPL_CONTEXT) == mask && TMPL_CONTEXT == tag->typ) { +- ZV(new_value) = (char*)erealloc(ZV(new_value), ZL(new_value)+2); ++ Z_STRVAL_P(new_value) = (char*)erealloc(ZV(new_value), ZL(new_value)+2); + memcpy(ZV(new_value)+ZL(new_value), "/", 2); + ZL(new_value) += 1; + } |