1
0
Fork 0

fixed #109: fast inc/dec was trying to break ro protection

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.2@432 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.2
Xuefer 15 years ago
parent 7957e6ac4b
commit 9c6952a563
  1. 1
      ChangeLog
  2. 5
      xcache.c

@ -4,6 +4,7 @@
== ChangeLog ==
* #86: remove/edit variable in admin page
* fixed #109: fast inc/dec was trying to break ro protection
* fixed #101, #105: Fixed compatibility issue for apache 1.x
* fixed #94: Garbage collector disabled when xcache.cacher set to off
* fixed #92: Zend Optimizer compatibility issue

@ -2001,6 +2001,7 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
/* do it in place */
stored_var = stored_xce->data.var;
if (Z_TYPE_P(stored_var->value) == IS_LONG) {
zval *zv;
stored_xce->ctime = XG(request_time);
stored_xce->ttl = xce.ttl;
#ifdef DEBUG
@ -2009,7 +2010,9 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
value = Z_LVAL_P(stored_var->value);
value += (inc == 1 ? count : - count);
RETVAL_LONG(value);
Z_LVAL_P(stored_var->value) = value;
zv = (zval *) xce.cache->shm->handlers->to_readwrite(xce.cache->shm, (char *) stored_var->value);
Z_LVAL_P(zv) = value;
break; /* leave lock */
}
else {

Loading…
Cancel
Save