com php-src: Fix nullptr dereference in clean without exec context: phpdbg_prompt.c

From: Date: Sun, 26 Oct 2014 23:00:15 +0000
Subject: com php-src: Fix nullptr dereference in clean without exec context: phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82784@lists.php.net to get a copy of this message
Commit: af9c6afa6f3465ae5b287af298fb148792f83d06 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 26 Oct 2014 10:48:45 +0100 Parents: de656f8a49ee0e8cd67812bac579747df9de98fa Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=af9c6afa6f3465ae5b287af298fb148792f83d06 Log: Fix nullptr dereference in clean without exec context Changed paths: M phpdbg_prompt.c Diff: diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 29c75c5..eca4c6a 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -1320,7 +1320,10 @@ void phpdbg_clean(zend_bool full TSRMLS_DC) /* {{{ */ } if (full) { - phpdbg_exec = strdup(PHPDBG_G(exec)); /* preserve exec, don't reparse that from cmd */ + if (PHPDBG_G(exec)) { + phpdbg_exec = strdup(PHPDBG_G(exec)); /* preserve exec, don't reparse that from cmd */ + } + PHPDBG_G(flags) |= PHPDBG_IS_CLEANING; zend_bailout();

« previous php.cvs (#82784) next »