diff options
author | Stanislav Malyshev <stas@php.net> | 2005-01-03 10:01:03 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2005-01-03 10:01:03 +0000 |
commit | 52ffca0b276ca3cf9c26f36bf9d9bc54ea316630 (patch) | |
tree | 7e23110d57040a6c3e2a1dfdd57a56621fefa1c6 | |
parent | 33cd288edcb9c27f09270499aacce61bf720d3d9 (diff) | |
download | php-git-52ffca0b276ca3cf9c26f36bf9d9bc54ea316630.tar.gz |
Fix the following nasty bug:
- if compile bails out from the middle of compiling, current_buffer is not restored
- if current_buffer is not null, yy_switch_to_buffer will do: *yy_c_buf_p = yy_hold_char; on
the next request
- which would lead to memory corruption on next request
-rw-r--r-- | Zend/zend_language_scanner.l | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 19c35332a5..fdaae01d5e 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -129,6 +129,7 @@ void startup_scanner(TSRMLS_D) RESET_DOC_COMMENT(); SCNG(yy_start_stack_ptr) = 0; SCNG(yy_start_stack_depth) = 0; + SCNG(current_buffer) = NULL; #ifdef ZEND_MULTIBYTE SCNG(script_org) = NULL; SCNG(script_org_size) = 0; |