From: Bob Weinand Date: Sun, 24 Nov 2013 12:03:00 +0000 (+0100) Subject: Prevent segfault when no execution context set with "b " X-Git-Tag: php-5.6.0alpha1~110^2~102^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8aab62d4d436d6ed2e089bd13d78390d1dfb68f;p=php Prevent segfault when no execution context set with "b " --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index a2130653bf..fb6b5bc37c 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -775,7 +775,11 @@ PHPDBG_COMMAND(break) /* {{{ */ phpdbg_set_breakpoint_opline(param->addr TSRMLS_CC); break; case NUMERIC_PARAM: - phpdbg_set_breakpoint_file(phpdbg_current_file(TSRMLS_C), param->num TSRMLS_CC); + if (PHPDBG_G(exec)) { + phpdbg_set_breakpoint_file(phpdbg_current_file(TSRMLS_C), param->num TSRMLS_CC); + } else { + phpdbg_error("Execution context not set !"); + } break; case METHOD_PARAM: phpdbg_set_breakpoint_method(param->method.class, param->method.name TSRMLS_CC);