Browse Source

merge some changes from trunk

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.3@886 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.3
Xuefer 9 years ago
parent
commit
9b3c12bd3d
  1. 4
      ChangeLog
  2. 4
      NEWS
  3. 6
      processor/processor.m4
  4. 10
      processor/string.m4
  5. 1
      xcache-test.ini
  6. 4
      xcache.h

4
ChangeLog

@ -1,3 +1,7 @@
1.3.3 2012-?-?
========
* fix constant name handling (possible SIGSEGV)
1.3.2 2011-06-04
========
* avoid possible filename injection in admin page

4
NEWS

@ -1,3 +1,7 @@
1.3.3 2012-?-?
========
* stability fix for PHP_5_3 and before
1.3.2 2011-06-04
========
* admin page security fix

6
processor/processor.m4

@ -240,11 +240,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, ZSTR(SRCSTR), $3 C_RELAYLINE);')
IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, ZSTR(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')

1
xcache-test.ini

@ -1,4 +1,5 @@
memory_limit = 256M
error_reporting = E_ALL|E_STRICT
[xcache]
zend_extension_debug_ts=./modules/xcache.so

4
xcache.h

@ -3,7 +3,7 @@
#define XCACHE_NAME "XCache"
#define XCACHE_VERSION "1.3.3-dev"
#define XCACHE_AUTHOR "mOo"
#define XCACHE_COPYRIGHT "Copyright (c) 2005-2011"
#define XCACHE_COPYRIGHT "Copyright (c) 2005-2012"
#define XCACHE_URL "http://xcache.lighttpd.net"
#define XCACHE_WIKI_URL XCACHE_URL "/wiki"
@ -21,7 +21,7 @@
#include "lock.h"
#define HAVE_INODE
#if !defined(ZEND_ENGINE_2_4) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 99 || PHP_MAJOR_VERSION > 5)
#if !defined(ZEND_ENGINE_2_4) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4 || PHP_MAJOR_VERSION > 5)
# define ZEND_ENGINE_2_4
#endif
#if !defined(ZEND_ENGINE_2_3) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 || defined(ZEND_ENGINE_2_4))

Loading…
Cancel
Save