summaryrefslogtreecommitdiff
path: root/phpdbg.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-10-25 15:28:41 +0200
committerBob Weinand <bobwei9@hotmail.com>2014-10-25 15:28:41 +0200
commite995ad1131781db91fb58002e06d9c638122df3c (patch)
treec986a37843fd1502c9d3cae9e6d863dfbe3d6f52 /phpdbg.c
parentb79e9044f90c4335c2a16f65bb31218a22ab282c (diff)
downloadphp-git-e995ad1131781db91fb58002e06d9c638122df3c.tar.gz
Fix eventual stack overflow after clean cmd
Diffstat (limited to 'phpdbg.c')
-rw-r--r--phpdbg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpdbg.c b/phpdbg.c
index f09dc4ee13..91133b3efb 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -1532,6 +1532,11 @@ phpdbg_out:
efree(SG(request_info).argv);
}
+#ifndef _WIN32
+ /* reset it... else we risk a stack overflow upon next run (when clean'ing) */
+ php_stream_stdio_ops.write = PHPDBG_G(php_stdiop_write);
+#endif
+
#ifndef ZTS
/* force cleanup of auto and core globals */
zend_hash_clean(CG(auto_globals));