Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #157 from m6w6/foreign-serializer-crash

Fix crashes with foreign serializers
commit def716a80f1be732b5dad1c13d3023248db64881 2 parents c157d8a + 657e373
@mkoppanen mkoppanen authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 php_memcached.c
View
8 php_memcached.c
@@ -838,7 +838,7 @@ static void php_memc_getMulti_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_ke
memcpy (res_key, tmp_key, res_key_len >= MEMCACHED_MAX_KEY ? MEMCACHED_MAX_KEY - 1 : res_key_len);
res_key [res_key_len] = '\0';
- MAKE_STD_ZVAL(value);
+ ALLOC_INIT_ZVAL(value);
if (php_memc_zval_from_payload(value, payload, payload_len, flags, m_obj->serializer TSRMLS_CC) < 0) {
zval_ptr_dtor(&value);
@@ -1057,7 +1057,7 @@ PHP_METHOD(Memcached, fetch)
res_key_len = memcached_result_key_length(&result);
cas = memcached_result_cas(&result);
- MAKE_STD_ZVAL(value);
+ ALLOC_INIT_ZVAL(value);
if (php_memc_zval_from_payload(value, payload, payload_len, flags, m_obj->serializer TSRMLS_CC) < 0) {
memcached_result_free(&result);
@@ -1114,7 +1114,7 @@ PHP_METHOD(Memcached, fetchAll)
res_key_len = memcached_result_key_length(&result);
cas = memcached_result_cas(&result);
- MAKE_STD_ZVAL(value);
+ ALLOC_INIT_ZVAL(value);
if (php_memc_zval_from_payload(value, payload, payload_len, flags, m_obj->serializer TSRMLS_CC) < 0) {
memcached_result_free(&result);
@@ -3663,7 +3663,7 @@ static int php_memc_do_result_callback(zval *zmemc_obj, zend_fcall_info *fci,
res_key_len = memcached_result_key_length(result);
cas = memcached_result_cas(result);
- MAKE_STD_ZVAL(value);
+ ALLOC_INIT_ZVAL(value);
i_obj = (php_memc_t *) zend_object_store_get_object(zmemc_obj TSRMLS_CC);
Please sign in to comment.
Something went wrong with that request. Please try again.