com php-src: Terminate string Useproper hash function: ext/wddx/wddx.c

From: Date: Tue, 13 May 2014 12:40:05 +0000
Subject: com php-src: Terminate string Useproper hash function: ext/wddx/wddx.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78314@lists.php.net to get a copy of this message
Commit: 0eeeaa1a23782a30a57ac04a5f17eb4c9ac50473 Author: Dmitry Stogov <dmitry@zend.com> Tue, 13 May 2014 16:40:05 +0400 Parents: 275e006734b4c82481f742a00ada976aad2fa59c Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0eeeaa1a23782a30a57ac04a5f17eb4c9ac50473 Log: Terminate string Useproper hash function Changed paths: M ext/wddx/wddx.c Diff: diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 699bad0..fd22262 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -274,6 +274,7 @@ PS_SERIALIZER_ENCODE_FUNC(wddx) php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); php_wddx_packet_end(packet); + smart_str_0(packet); str = STR_COPY(packet->s); php_wddx_destructor(packet); @@ -908,7 +909,7 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name) zend_str_tolower(Z_STRVAL(ent1->data), Z_STRLEN(ent1->data)); STR_FORGET_HASH_VAL(Z_STR(ent1->data)); - if ((pce = zend_hash_find(EG(class_table), Z_STR(ent1->data))) == NULL) { + if ((pce = zend_hash_find_ptr(EG(class_table), Z_STR(ent1->data))) == NULL) { incomplete_class = 1; pce = PHP_IC_ENTRY; } @@ -1079,7 +1080,8 @@ PHP_FUNCTION(wddx_serialize_value) php_wddx_packet_start(packet, comment, comment_len); php_wddx_serialize_var(packet, var, NULL TSRMLS_CC); php_wddx_packet_end(packet); - + smart_str_0(packet); + RETVAL_STR(STR_COPY(packet->s)); php_wddx_destructor(packet); } @@ -1184,6 +1186,7 @@ PHP_FUNCTION(wddx_packet_end) php_wddx_add_chunk_static(packet, WDDX_STRUCT_E); php_wddx_packet_end(packet); + smart_str_0(packet); RETVAL_STR(STR_COPY(packet->s));

« previous php.cvs (#78314) next »