Browse Source

fix constant name handling (possible SIGSEGV)

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@828 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 10 years ago
parent
commit
eb52f93f2a
  1. 9
      ChangeLog
  2. 6
      NEWS
  3. 6
      processor/processor.m4
  4. 10
      processor/string.m4

9
ChangeLog

@ -1,4 +1,4 @@
2.0.0 2011-?-?
2.0.0 2012-?-?
Ini Settings Changes
========
* new: xcache.experimental = Off
@ -10,6 +10,13 @@ ChangeLog
* fixed #55: segv php tokenizer on certain special situation
* compiler errors: all compiler warning (E_STRICT only currently) is now cached and is supported for user handler
1.3.2 2012-?-?
========
* fix constant name handling (possible SIGSEGV)
1.3.2 2012-03-23
========
1.3.2 2011-06-04
========
* avoid possible filename injection in admin page

6
NEWS

@ -1,6 +1,10 @@
2.0.0 2011-?-?
2.0.0 2012-?-?
* Cache 1 copy for all files with same content
1.3.2 2012-?-?
========
* stability fix for prior PHP_5_4
1.3.2 2011-06-04
========
* admin page security fix

6
processor/processor.m4

@ -252,11 +252,9 @@ DEF_STRUCT_P_FUNC(`zend_constant', , `dnl {{{
STRUCT(zval, value)
DISPATCH(int, flags)
DISPATCH(uint, name_len)
pushdef(`emalloc', `malloc($1)')
pushdef(`ecalloc', `calloc($1, $2)')
pushdef(`estrndup', `zend_strndup')
PROC_ZSTRING_N(, name, name_len)
popdef(`ecalloc')
popdef(`emalloc')
popdef(`estrndup')
DISPATCH(int, module_number)
')
dnl }}}

10
processor/string.m4

@ -20,9 +20,9 @@ define(`PROC_STRING_N_EX', `
STRTYPE, `zstr_uchar', `ZSTR_U($1)',
STRTYPE, `zstr_char', `ZSTR_S($1)',
`', `', `$1'))
pushdef(`U', ifelse(
PTRTYPE, `char', `',
PTRTYPE, `UChar', `u'))
pushdef(`STRDUP', ifelse(
PTRTYPE, `char', `estrndup',
PTRTYPE, `UChar', `eustrndup'))
if (SRCPTR == NULL) {
IFNOTMEMCPY(`IFCOPY(`
DSTPTR = NULL;
@ -61,7 +61,7 @@ define(`PROC_STRING_N_EX', `
IFCALC(`xc_calc_string_n(processor, ISTYPE, SRCSTR, $3 C_RELAYLINE);')
IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, SRCSTR, $3 C_RELAYLINE));')
IFRESTORE(`
DSTPTR = e`'U`'strndup(SRCPTR, ($3) - 1);
DSTPTR = STRDUP() (SRCPTR, ($3) - 1);
')
FIXPOINTER_EX(`PTRTYPE', DSTPTR)
IFDASM(`
@ -76,7 +76,7 @@ define(`PROC_STRING_N_EX', `
')
')
}
popdef(`U')
popdef(`STRDUP')
popdef(`DSTPTR')
popdef(`SRCPTR')
popdef(`SRCSTR')

Loading…
Cancel
Save