From: krakjoe Date: Fri, 15 Nov 2013 20:52:48 +0000 (+0000) Subject: fix segfault on some implementations of atoi X-Git-Tag: php-5.6.0alpha1~110^2~295 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a56e9bc84edc4cee86f8ee92d7623bc540e3386;p=php fix segfault on some implementations of atoi --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 38b581e1f9..aef50d851e 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -257,7 +257,7 @@ static PHPDBG_COMMAND(compile) /* {{{ */ static PHPDBG_COMMAND(step) /* {{{ */ { - if (atoi(expr)) { + if (expr && atoi(expr)) { PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; } else { PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; @@ -636,7 +636,7 @@ static PHPDBG_COMMAND(help) /* {{{ */ } /* }}} */ static PHPDBG_COMMAND(quiet) { /* {{{ */ - if (atoi(expr)) { + if (expr && atoi(expr)) { PHPDBG_G(flags) |= PHPDBG_IS_QUIET; } else { PHPDBG_G(flags) &= ~PHPDBG_IS_QUIET;