diff options
author | Thies C. Arntzen <thies@php.net> | 2001-07-10 08:20:20 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 2001-07-10 08:20:20 +0000 |
commit | bcddfd474a0db1ac4c440930ac74f3ed6626a5a2 (patch) | |
tree | c50cc42339a3a062a64f85bb1f0286620540082f /Zend/zend_variables.c | |
parent | 6297cd26e28b89d0e1a509f2d4f744e9ac5a0d15 (diff) | |
download | php-git-bcddfd474a0db1ac4c440930ac74f3ed6626a5a2.tar.gz |
cleaned up the RETVAL_ RETURN_ and ZVAL_ macros
added check for \0 at end-of-string at some places. all strings in PHP
have to be terminated with \0 because 3th party libraries might not be
binary-safe.
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r-- | Zend/zend_variables.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index d551541a5a..af1be82ed9 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -59,6 +59,7 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC) switch(zvalue->type) { case IS_STRING: case IS_CONSTANT: + CHECK_ZVAL_STRING(zvalue); STR_FREE_REL(zvalue->value.str.val); break; case IS_ARRAY: @@ -114,6 +115,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC) return SUCCESS; } } + CHECK_ZVAL_STRING(zvalue); zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len); break; case IS_ARRAY: |