diff options
| author | Dmitry Stogov <dmitry@php.net> | 2007-11-22 13:27:13 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2007-11-22 13:27:13 +0000 |
| commit | 648fbe9d5838073154f3737829d5298502184343 (patch) | |
| tree | bd21fcbb0af89d62032a842dc4e6f29518fa3cdf /Zend/zend_object_handlers.c | |
| parent | 1836daf7f9f3ab088a65fd8c0b8c9421d6550be5 (diff) | |
| download | php-git-648fbe9d5838073154f3737829d5298502184343.tar.gz | |
Fixed bug #43128 (Very long class name causes segfault)
Diffstat (limited to 'Zend/zend_object_handlers.c')
| -rw-r--r-- | Zend/zend_object_handlers.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 017f3df635..56ff4ab1b2 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -776,14 +776,15 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method zend_function *fbc; char *lc_method_name; zval *object = *object_ptr; + ALLOCA_FLAG(use_heap) - lc_method_name = do_alloca(method_len+1); + lc_method_name = do_alloca(method_len+1, use_heap); /* Create a zend_copy_str_tolower(dest, src, src_length); */ zend_str_tolower_copy(lc_method_name, method_name, method_len); zobj = Z_OBJ_P(object); if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&fbc) == FAILURE) { - free_alloca(lc_method_name); + free_alloca(lc_method_name, use_heap); if (zobj->ce->__call) { zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function)); call_user_call->type = ZEND_INTERNAL_FUNCTION; @@ -838,7 +839,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method } } - free_alloca(lc_method_name); + free_alloca(lc_method_name, use_heap); return fbc; } /* }}} */ |
