From: Bob Weinand Date: Sun, 26 Oct 2014 09:48:45 +0000 (+0100) Subject: Fix nullptr dereference in clean without exec context X-Git-Tag: php-5.6.3RC1~34^2~3^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ff04117c3937de6af116a229c0b43c8ca969b70;p=php Fix nullptr dereference in clean without exec context --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 29c75c583c..eca4c6ac2b 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();