Changeset 111


Ignore:
Timestamp:
2006-08-28T02:31:00+02:00 (8 years ago)
Author:
moo
Message:

trigger hash_init+zend_destroy_property_info to compatible with suhosin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r107 r111  
    11181118    xc_coverager_request_init(TSRMLS_C); 
    11191119#endif 
     1120#if defined(SUHOSIN_PATCH) && SUHOSIN_PATCH && defined(ZEND_ENGINE_2) 
     1121    { 
     1122        static zend_bool suhosin_trick_done = 0; 
     1123        if (!suhosin_trick_done) { 
     1124            zend_class_entry *tmpclass = emalloc(sizeof(zend_class_entry)); 
     1125 
     1126            suhosin_trick_done = 1; 
     1127            tmpclass->type = ZEND_USER_CLASS; 
     1128            tmpclass->name = emalloc(5); 
     1129            tmpclass->name_length = 4; 
     1130            memcpy(tmpclass->name, "test", tmpclass->name_length); 
     1131 
     1132            zend_initialize_class_data(tmpclass, 1 TSRMLS_CC); 
     1133            destroy_zend_class(&tmpclass); 
     1134        } 
     1135    } 
     1136#endif 
    11201137} 
    11211138/* }}} */ 
Note: See TracChangeset for help on using the changeset viewer.