Changeset 8964a39 in git


Ignore:
Timestamp:
2014-09-11T16:33:03Z (3 years ago)
Author:
Xuefer <xuefer@…>
Branches:
3.2
Children:
4c94a99
Parents:
1dfe7cc
Message:

MFT: [1523] refix fix leak in decompiler/disassembler, was broken for older PHP

git-svn-id: svn://svn.lighttpd.net/xcache/branches/3.2@1524 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • xcache.c

    r1dfe7cc r8964a39  
    332332{
    333333    zval *value;
     334    zval value_copied;
    334335
    335336    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) {
    336337        return;
    337338    }
     339    value_copied = *value;
     340    value = &value_copied;
    338341
    339342    switch ((Z_TYPE_P(value) & IS_CONSTANT_TYPE_MASK)) {
    340343    case IS_CONSTANT:
    341         MAKE_COPY_ZVAL(&value, return_value)
    342         return_value->type = UNISW(IS_STRING, UG(unicode) ? IS_UNICODE : IS_STRING);
     344        value->type = UNISW(IS_STRING, UG(unicode) ? IS_UNICODE : IS_STRING);
     345        RETURN_ZVAL(value, 1, 0);
    343346        break;
    344347
    345348#ifdef IS_CONSTANT_ARRAY
    346349    case IS_CONSTANT_ARRAY:
    347         MAKE_COPY_ZVAL(&value, return_value)
    348         return_value->type = IS_ARRAY;
     350        value->type = IS_ARRAY;
     351        RETURN_ZVAL(value, 1, 0);
    349352        break;
    350353#endif
     
    358361    default:
    359362        if ((Z_TYPE_P(value) & ~IS_CONSTANT_TYPE_MASK)) {
    360             MAKE_COPY_ZVAL(&value, return_value);
    361             return_value->type &= IS_CONSTANT_TYPE_MASK;
     363            value->type &= IS_CONSTANT_TYPE_MASK;
     364            RETURN_ZVAL(value, 1, 0);
    362365        }
    363366        else {
  • xcache/xc_compatibility.h

    r1dfe7cc r8964a39  
    220220/* }}} */
    221221
    222 #ifndef MAKE_COPY_ZVAL
    223 #   define MAKE_COPY_ZVAL(ppzv, pzv) \
    224     *(pzv) = **(ppzv);            \
    225     zval_copy_ctor((pzv));        \
    226     INIT_PZVAL((pzv));
    227 #endif
    228 
    229222/* the class entry type to be stored in class_table */
    230223typedef ZESW(zend_class_entry, zend_class_entry*) xc_cest_t;
Note: See TracChangeset for help on using the changeset viewer.