diff options
| author | Thies C. Arntzen <thies@php.net> | 2001-08-04 16:53:57 +0000 |
|---|---|---|
| committer | Thies C. Arntzen <thies@php.net> | 2001-08-04 16:53:57 +0000 |
| commit | 3884b15b9544f6d9d749d14d2b0cad9eca29a201 (patch) | |
| tree | 9dd58c2bd26b6604f67be48df38384e5736bbee0 /ext/standard/string.c | |
| parent | d789d45a2ea2280ad6eff2c391569fe513e6b2f9 (diff) | |
| download | php-git-3884b15b9544f6d9d749d14d2b0cad9eca29a201.tar.gz | |
fix possible crash - we should never keep the zval** as they might point
somewhere into the Engine. (there's still a new bug in strtok - hunting;-)
Diffstat (limited to 'ext/standard/string.c')
| -rw-r--r-- | ext/standard/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index 8cfc609549..0ca7ac5f91 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -867,8 +867,8 @@ PHP_FUNCTION(strtok) zval_add_ref(str); if (BG(strtok_zval)) - zval_ptr_dtor(BG(strtok_zval)); - BG(strtok_zval) = str; + zval_ptr_dtor(&BG(strtok_zval)); + BG(strtok_zval) = *str; BG(strtok_last) = BG(strtok_string) = Z_STRVAL_PP(str); BG(strtok_len) = Z_STRLEN_PP(str); |
