summaryrefslogtreecommitdiff
path: root/Zend/zend_API.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r--Zend/zend_API.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index a56075e177..e17be4ce68 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -447,7 +447,7 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC)
#define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC)
#define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC)
-#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC)
+#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC)
ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC);
@@ -458,7 +458,7 @@ ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
/** Build zend_call_info/cache from a zval*
*
- * Caller is responsible to provide a return value, otherwise the we will crash.
+ * Caller is responsible to provide a return value, otherwise the we will crash.
* fci->retval_ptr_ptr = NULL;
* In order to pass parameters the following members need to be set:
* fci->param_count = 0;
@@ -578,6 +578,9 @@ END_EXTERN_C()
const char *__s=(s); \
zval *__z = (z); \
Z_STRLEN_P(__z) = strlen(__s); \
+ if (UNEXPECTED(Z_STRLEN_P(__z) < 0)) { \
+ zend_error(E_ERROR, "String size overflow"); \
+ } \
Z_STRVAL_P(__z) = (duplicate?estrndup(__s, Z_STRLEN_P(__z)):(char*)__s);\
Z_TYPE_P(__z) = IS_STRING; \
} while (0)