com php-src: Fix nullptr dereference in clean without exec context: sapi/phpdbg/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: sapi/phpdbg/phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82673@lists.php.net to get a copy of this message
Commit: 69bc61de419ccd92bfa308f356b56591f7696413 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 26 Oct 2014 10:48:45 +0100 Parents: 41537cdddc71a6e499f1c7c118bf862105ff95fa Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=69bc61de419ccd92bfa308f356b56591f7696413 Log: Fix nullptr dereference in clean without exec context Changed paths: M sapi/phpdbg/phpdbg_prompt.c Diff: diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 29c75c5..eca4c6a 100644 --- a/sapi/phpdbg/phpdbg_prompt..c +++ b/sapi/phpdbg/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 (#82673) next »