From 7264ffe50d5ed13f5ecfc7db51237fcaf5d726f9 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Wed, 7 Apr 2004 14:02:29 +0000 Subject: [PATCH] - Fix crash bug in zend_debug_backtrace(). No idea how come this survived - for so long.... --- Zend/zend_builtin_functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 53fdaeeeed..69963f2cc7 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1437,7 +1437,7 @@ ZEND_FUNCTION(debug_print_backtrace) char *call_type; char *include_filename = NULL; zval *arg_array = NULL; - void **cur_arg_pos = EG(argument_stack).top_element; + void **cur_arg_pos = EG(argument_stack).top_element-1; void **args = cur_arg_pos; int arg_stack_consistent = 0; int frames_on_stack = 0; @@ -1562,7 +1562,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML char *call_type; char *include_filename = NULL; zval *stack_frame; - void **cur_arg_pos = EG(argument_stack).top_element; + void **cur_arg_pos = EG(argument_stack).top_element-1; void **args = cur_arg_pos; int arg_stack_consistent = 0; int frames_on_stack = 0; -- 2.50.1