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

From: Date: Sun, 26 Oct 2014 09:48:45 +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-82685@lists.php.net to get a copy of this message
Commit: 1ff04117c3937de6af116a229c0b43c8ca969b70 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 26 Oct 2014 10:48:45 +0100 Parents: 65eaab52b6cb241ca0bac7d8abe691be37d122bb Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1ff04117c3937de6af116a229c0b43c8ca969b70 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 (#82685) next »