]> granicus.if.org Git - php/commitdiff
- Fix crash bug in zend_debug_backtrace(). No idea how come this survived
authorAndi Gutmans <andi@php.net>
Wed, 7 Apr 2004 14:02:29 +0000 (14:02 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 7 Apr 2004 14:02:29 +0000 (14:02 +0000)
- for so long....

Zend/zend_builtin_functions.c

index 53fdaeeeed936fe72d475813527179f25a884194..69963f2cc7772f55a64fd615c0636417e3f68f04 100644 (file)
@@ -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;