tony2001 Thu Aug 24 08:30:28 2006 UTC Added files: (Branch: PHP_4_4) /php-src/ext/wddx/tests bug38738.phpt
Modified files: /php-src NEWS /php-src/ext/wddx wddx.c Log: fix #38378 (wddx_serialize_value() generates no wellformed xml) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.157&r2=1.1247.2.920.2.158&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.157 php-src/NEWS:1.1247.2.920.2.158 --- php-src/NEWS:1.1247.2.920.2.157 Tue Aug 15 12:23:08 2006 +++ php-src/NEWS Thu Aug 24 08:30:28 2006 @@ -1,6 +1,8 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2006, Version 4.4.5 +- Fixed bug #38378 (wddx_serialize_value() generates no wellformed xml). + (sj at sjaensch dot org, grzegorz dot nosek at netart dot pl, Tony). 17 Aug 2006, Version 4.4.4 - Fixed memory_limit on 64bit systems. (Stefan E.) http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.96.2.6.2.7&r2=1.96.2.6.2.8&diff_format=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.96.2.6.2.7 php-src/ext/wddx/wddx.c:1.96.2.6.2.8 --- php-src/ext/wddx/wddx.c:1.96.2.6.2.7 Fri May 26 01:55:26 2006 +++ php-src/ext/wddx/wddx.c Thu Aug 24 08:30:28 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.96.2.6.2.7 2006/05/26 01:55:26 iliaa Exp $ */ +/* $Id: wddx.c,v 1.96.2.6.2.8 2006/08/24 08:30:28 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -432,7 +432,7 @@ tmp = *var; zval_copy_ctor(&tmp); convert_to_string(&tmp); - snprintf(tmp_buf, Z_STRLEN(tmp), WDDX_NUMBER, Z_STRVAL(tmp)); + snprintf(tmp_buf, sizeof(tmp_buf), WDDX_NUMBER, Z_STRVAL(tmp)); zval_dtor(&tmp); php_wddx_add_chunk(packet, tmp_buf); @@ -630,8 +630,8 @@ if (name) { name_esc = php_escape_html_entities(name, name_len, &name_esc_len, 0, ENT_QUOTES, NULL TSRMLS_CC); - tmp_buf = emalloc(name_esc_len + 1); - snprintf(tmp_buf, name_esc_len, WDDX_VAR_S, name_esc); + tmp_buf = emalloc(name_esc_len + sizeof(WDDX_VAR_S)); + snprintf(tmp_buf, name_esc_len + sizeof(WDDX_VAR_S), WDDX_VAR_S, name_esc); php_wddx_add_chunk(packet, tmp_buf); efree(tmp_buf); efree(name_esc); http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/bug38738.phpt?view=markup&rev=1.1 Index: php-src/ext/wddx/tests/bug38738.phpt +++ php-src/ext/wddx/tests/bug38738.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php