[PHP-CVS] cvs: php-src /ext/dom/tests dom002.phpt
moriyoshi Mon Oct 20 22:43:24 2003 EDT Added files: /php-src/ext/dom/tests dom002.phpt Log: Add a test case for getElementsByTagName() / getElementsByTagNameNS() Index: php-src/ext/dom/tests/dom002.phpt +++ php-src/ext/dom/tests/dom002.phpt --TEST-- Test 2: getElementsByTagName() / getElementsByTagNameNS() --SKIPIF-- --FILE-- http://www.example.com/ns/foo"; xmlns:fubar="http://www.example.com/ns/fubar";> HERE; function dump($elems) { foreach ($elems as $elem) { var_dump($elem->nodeName); dump($elem->childNodes); } } $dom = new DOMDocument(); $dom->loadXML($xml); $doc = $dom->documentElement; dump($dom->getElementsByTagName('bar')); dump($doc->getElementsByTagName('bar')); dump($dom->getElementsByTagNameNS('http://www.example.com/ns/fubar', 'bar')); dump($doc->getElementsByTagNameNS('http://www.example.com/ns/fubar', 'bar')); ?> --EXPECT-- string(3) "bar" string(5) "test1" string(3) "bar" string(5) "test2" string(9) "fubar:bar" string(5) "test3" string(9) "fubar:bar" string(5) "test4" string(3) "bar" string(5) "test1" string(3) "bar" string(5) "test2" string(9) "fubar:bar" string(5) "test3" string(9) "fubar:bar" string(5) "test4" string(9) "fubar:bar" string(5) "test3" string(9) "fubar:bar" string(5) "test4" string(9) "fubar:bar" string(5) "test3" string(9) "fubar:bar" string(5) "test4" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/domxml/tests bug25900.phpt
moriyoshi Mon Oct 20 22:22:56 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/domxml/tests bug25900.phpt Log: typo Index: php-src/ext/domxml/tests/bug25900.phpt diff -u php-src/ext/domxml/tests/bug25900.phpt:1.1.2.1 php-src/ext/domxml/tests/bug25900.phpt:1.1.2.2 --- php-src/ext/domxml/tests/bug25900.phpt:1.1.2.1 Mon Oct 20 22:21:29 2003 +++ php-src/ext/domxml/tests/bug25900.phpt Mon Oct 20 22:22:55 2003 @@ -1,5 +1,5 @@ --TEST-- -Bug #25900 (DomDocument->get_elements_by_tagname() doen't work with default ns) +Bug #25900 (DomDocument->get_elements_by_tagname() doesn't work with default ns) --SKIPIF-- --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/domxml/tests bug25900.phpt
moriyoshi Mon Oct 20 22:21:30 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/domxml/tests bug25900.phpt Log: Add regression test for bug #25900 Index: php-src/ext/domxml/tests/bug25900.phpt +++ php-src/ext/domxml/tests/bug25900.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard html.c
moriyoshi Mon Oct 20 21:46:55 2003 EDT Modified files: /php-src/ext/standard html.c Log: Missing '&' in the result of get_html_translation_table() Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.90 php-src/ext/standard/html.c:1.91 --- php-src/ext/standard/html.c:1.90Thu Oct 2 15:23:00 2003 +++ php-src/ext/standard/html.c Mon Oct 20 21:46:54 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.90 2003/10/02 19:23:00 moriyoshi Exp $ */ +/* $Id: html.c,v 1.91 2003/10/21 01:46:54 moriyoshi Exp $ */ /* * HTML entity resources: @@ -1229,8 +1229,10 @@ continue; ind[0] = (unsigned char)basic_entities[j].charcode; - add_assoc_string(return_value, ind, basic_entities[j].entity, 1); + add_assoc_stringl(return_value, ind, basic_entities[j].entity, basic_entities[j].entitylen, 1); } + add_assoc_stringl(return_value, "&", "&", sizeof("&") - 1, 1); + break; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS configure.in /main php_version.h
iliaa Mon Oct 20 12:58:57 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcconfigure.in NEWS /php-src/main php_version.h Log: Back to dev. Index: php-src/configure.in diff -u php-src/configure.in:1.396.2.81 php-src/configure.in:1.396.2.82 --- php-src/configure.in:1.396.2.81 Mon Oct 20 12:08:16 2003 +++ php-src/configure.inMon Oct 20 12:58:55 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.81 2003/10/20 16:08:16 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.82 2003/10/20 16:58:55 iliaa Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -41,7 +41,7 @@ MAJOR_VERSION=4 MINOR_VERSION=3 RELEASE_VERSION=4 -EXTRA_VERSION="RC2" +EXTRA_VERSION="RC3-dev" VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION" dnl Define where extension directories are located in the configure context Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.442 php-src/NEWS:1.1247.2.443 --- php-src/NEWS:1.1247.2.442 Mon Oct 20 11:45:56 2003 +++ php-src/NEWSMon Oct 20 12:58:55 2003 @@ -1,6 +1,8 @@ PHP 4 NEWS ||| -?? Oct 2003, Version 4.3.4RC2 +?? Oct 2003, Version 4.3.4RC3 + +20 Oct 2003, Version 4.3.4RC2 - Fixed multibyte regex engine to properly handle ".*" pattern under POSIX compatible mode. (K.Kosako , Moriyoshi) - Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia) Index: php-src/main/php_version.h diff -u php-src/main/php_version.h:1.66.2.33 php-src/main/php_version.h:1.66.2.34 --- php-src/main/php_version.h:1.66.2.33Mon Oct 20 12:08:17 2003 +++ php-src/main/php_version.h Mon Oct 20 12:58:56 2003 @@ -3,5 +3,5 @@ #define PHP_MAJOR_VERSION 4 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 4 -#define PHP_EXTRA_VERSION "RC2" -#define PHP_VERSION "4.3.4RC2" +#define PHP_EXTRA_VERSION "RC3-dev" +#define PHP_VERSION "4.3.4RC3-dev" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/file bug20424.phpt
moriyoshi Mon Oct 20 12:10:01 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard/tests/filebug20424.phpt Log: MFH(r-1.4): Fix typo Index: php-src/ext/standard/tests/file/bug20424.phpt diff -u php-src/ext/standard/tests/file/bug20424.phpt:1.1.2.1 php-src/ext/standard/tests/file/bug20424.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/bug20424.phpt:1.1.2.1 Thu Nov 14 05:52:45 2002 +++ php-src/ext/standard/tests/file/bug20424.phpt Mon Oct 20 12:10:00 2003 @@ -1,5 +1,5 @@ --TEST-- -Bug #20424: stream_get_meta_data craches on a normal file stream +Bug #20424 (stream_get_meta_data crashes on a normal file stream) --POST-- --GET-- --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / configure.in /main php_version.h
iliaa Mon Oct 20 12:08:22 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcconfigure.in /php-src/main php_version.h Log: RC2 is a go. Index: php-src/configure.in diff -u php-src/configure.in:1.396.2.80 php-src/configure.in:1.396.2.81 --- php-src/configure.in:1.396.2.80 Tue Oct 7 06:04:51 2003 +++ php-src/configure.inMon Oct 20 12:08:16 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.80 2003/10/07 10:04:51 helly Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.81 2003/10/20 16:08:16 iliaa Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -41,7 +41,7 @@ MAJOR_VERSION=4 MINOR_VERSION=3 RELEASE_VERSION=4 -EXTRA_VERSION="RC2-dev" +EXTRA_VERSION="RC2" VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION" dnl Define where extension directories are located in the configure context Index: php-src/main/php_version.h diff -u php-src/main/php_version.h:1.66.2.32 php-src/main/php_version.h:1.66.2.33 --- php-src/main/php_version.h:1.66.2.32Mon Sep 29 20:35:52 2003 +++ php-src/main/php_version.h Mon Oct 20 12:08:17 2003 @@ -3,5 +3,5 @@ #define PHP_MAJOR_VERSION 4 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 4 -#define PHP_EXTRA_VERSION "RC2-dev" -#define PHP_VERSION "4.3.4RC2-dev" +#define PHP_EXTRA_VERSION "RC2" +#define PHP_VERSION "4.3.4RC2" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dom document.c dom_ce.h element.c node.c php_dom.c xpath.c
rrichards Mon Oct 20 11:50:35 2003 EDT Modified files: /php-src/ext/domxpath.c php_dom.c node.c element.c dom_ce.h document.c Log: implement namespace nodes fix getElementsByTagName fixes to attribute namespaces remove safemode stuff as its handled in streams Index: php-src/ext/dom/xpath.c diff -u php-src/ext/dom/xpath.c:1.7 php-src/ext/dom/xpath.c:1.8 --- php-src/ext/dom/xpath.c:1.7 Sun Oct 5 12:37:50 2003 +++ php-src/ext/dom/xpath.c Mon Oct 20 11:50:34 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: xpath.c,v 1.7 2003/10/05 16:37:50 shane Exp $ */ +/* $Id: xpath.c,v 1.8 2003/10/20 15:50:34 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -214,8 +214,27 @@ for (i = 0; i < nodesetp->nodeNr; i++) { xmlNodePtr node = nodesetp->nodeTab[i]; zval *child; - MAKE_STD_ZVAL(child); + MAKE_STD_ZVAL(child); + + if (node->type == XML_NAMESPACE_DECL) { + xmlNsPtr curns; + xmlNodePtr nsparent; + + nsparent = node->_private; + curns = xmlNewNs(NULL, node->name, NULL); + if (node->children) { + curns->prefix = xmlStrdup((char *) node->children); + } + if (node->children) { + node = xmlNewDocNode(docp, NULL, (char *) node->children, node->name); + } else { + node = xmlNewDocNode(docp, NULL, "xmlns", node->name); + } + node->type = XML_NAMESPACE_DECL; + node->parent = nsparent; + node->ns = curns; + } child = php_dom_create_object(node, &ret, NULL, child, intern TSRMLS_CC); add_next_index_zval(return_value, child); } Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.37 php-src/ext/dom/php_dom.c:1.38 --- php-src/ext/dom/php_dom.c:1.37 Sun Oct 19 19:17:54 2003 +++ php-src/ext/dom/php_dom.c Mon Oct 20 11:50:34 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.c,v 1.37 2003/10/19 23:17:54 shane Exp $ */ +/* $Id: php_dom.c,v 1.38 2003/10/20 15:50:34 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -58,6 +58,7 @@ static HashTable dom_notation_prop_handlers; static HashTable dom_entity_prop_handlers; static HashTable dom_processinginstruction_prop_handlers; +static HashTable dom_namespace_node_prop_handlers; #if defined(LIBXML_XPATH_ENABLED) static HashTable dom_xpath_prop_handlers; #endif @@ -485,6 +486,19 @@ dom_register_prop_handler(&dom_node_prop_handlers, "textContent", dom_node_text_content_read, dom_node_text_content_write TSRMLS_CC); zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_node_prop_handlers, sizeof(dom_node_prop_handlers), NULL); + REGISTER_DOM_CLASS(ce, "domnamespacenode", NULL, NULL, dom_namespace_node_class_entry); + + zend_hash_init(&dom_namespace_node_prop_handlers, 0, NULL, NULL, 1); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "nodeName", dom_node_node_name_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "nodeValue", dom_node_node_value_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "nodeType", dom_node_node_type_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "prefix", dom_node_prefix_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "localName", dom_node_local_name_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "namespaceURI", dom_node_namespace_uri_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "ownerDocument", dom_node_owner_document_read, NULL TSRMLS_CC); + dom_register_prop_handler(&dom_namespace_node_prop_handlers, "parentNode", dom_node_parent_node_read, NULL TSRMLS_CC); + zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_namespace_node_prop_handlers, sizeof(dom_namespace_node_prop_handlers), NULL); + REGISTER_DOM_CLASS(ce, "domdocumentfragment", dom_node_class_entry, php_dom_documentfragment_class_functions, dom_documentfragment_class_entry); zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_node_prop_handlers, sizeof(dom_node_pr
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS
iliaa Mon Oct 20 11:45:57 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: Bug fixing news. Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.441 php-src/NEWS:1.1247.2.442 --- php-src/NEWS:1.1247.2.441 Mon Oct 20 10:37:01 2003 +++ php-src/NEWSMon Oct 20 11:45:56 2003 @@ -1,16 +1,19 @@ PHP 4 NEWS ||| ?? Oct 2003, Version 4.3.4RC2 -- Fixed bug #25825 (tzset() was not called to reset libc environment - on request shutdown). (Wez) - Fixed multibyte regex engine to properly handle ".*" pattern under POSIX compatible mode. (K.Kosako , Moriyoshi) - Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia) - Fixed bug #25918 (Possible crash in mime_content_type()). (Ilia) +- Fixed bug #25900 (document->get_elements_by_tag_name with default xmlns). + (Rob) - Fixed bug #25895 (Incorrect detection of safe_mode limited ini options). (Ilia) +- Fixed bug #25888 (Crash of php.exe when xpath_eval of a namespace). (Rob) - Fixed bug #25836 (last key of multi-dimensional array passed via GPC not being escaped when magic_quotes_gpc is on). (Ilia) +- Fixed bug #25825 (tzset() was not called to reset libc environment + on request shutdown). (Wez) - Fixed bug #25814 (Make flock() return correct value when 3rd argument is used). (Ilia) - Fixed bug #25800 (parse_url() could not parse urls with empty port). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file bug20424.phpt
moriyoshi Mon Oct 20 11:45:02 2003 EDT Modified files: /php-src/ext/standard/tests/filebug20424.phpt Log: Fix typo Index: php-src/ext/standard/tests/file/bug20424.phpt diff -u php-src/ext/standard/tests/file/bug20424.phpt:1.3 php-src/ext/standard/tests/file/bug20424.phpt:1.4 --- php-src/ext/standard/tests/file/bug20424.phpt:1.3 Mon Aug 18 18:57:49 2003 +++ php-src/ext/standard/tests/file/bug20424.phpt Mon Oct 20 11:45:01 2003 @@ -1,5 +1,5 @@ --TEST-- -Bug #20424: stream_get_meta_data craches on a normal file stream +Bug #20424 (stream_get_meta_data crashes on a normal file stream) --POST-- --GET-- --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/domxml php_domxml.c
rrichards Mon Oct 20 11:43:03 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/domxml php_domxml.c Log: Fix bug #25900 (document->get_elements_by_tag_name with default xmlns) Index: php-src/ext/domxml/php_domxml.c diff -u php-src/ext/domxml/php_domxml.c:1.218.2.33 php-src/ext/domxml/php_domxml.c:1.218.2.34 --- php-src/ext/domxml/php_domxml.c:1.218.2.33 Fri Oct 17 11:56:06 2003 +++ php-src/ext/domxml/php_domxml.c Mon Oct 20 11:43:02 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.218.2.33 2003/10/17 15:56:06 rrichards Exp $ */ +/* $Id: php_domxml.c,v 1.218.2.34 2003/10/20 15:43:02 rrichards Exp $ */ /* TODO * - Support Notation Nodes @@ -3078,11 +3078,11 @@ DOMXML_GET_OBJ(contextnodep, contextnode, le_domxmlnodep); } ctxp->node = contextnodep; - str = (char*) emalloc((name_len+3) * sizeof(char)) ; + str = (char*) emalloc((name_len+23) * sizeof(char)) ; if (str == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot allocate memory for string"); } - sprintf(str ,"//%s",name); + sprintf(str ,"//*[local-name() = '%s']", name); xpathobjp = xmlXPathEval(str, ctxp); efree(str); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/wddx wddx.c
moriyoshi Mon Oct 20 11:42:11 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/wddx wddx.c Log: MFH(r-1.108): Fix compiler warnings Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.96.2.4 php-src/ext/wddx/wddx.c:1.96.2.5 --- php-src/ext/wddx/wddx.c:1.96.2.4Sat Jun 28 02:59:31 2003 +++ php-src/ext/wddx/wddx.c Mon Oct 20 11:42:10 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.96.2.4 2003/06/28 06:59:31 iliaa Exp $ */ +/* $Id: wddx.c,v 1.96.2.5 2003/10/20 15:42:10 moriyoshi Exp $ */ #include "php.h" #include "php_wddx.h" @@ -93,7 +93,7 @@ } wddx_stack; -static void php_wddx_process_data(void *user_data, const char *s, int len); +static void php_wddx_process_data(void *user_data, const XML_Char *s, int len); /* {{{ wddx_functions[] */ @@ -400,7 +400,7 @@ break; default: - if (iscntrl((int)*p)) { + if (iscntrl((int)*(unsigned char *)p)) { FLUSH_BUF(); sprintf(control_buf, WDDX_CHAR, *p); php_wddx_add_chunk(packet, control_buf); @@ -696,7 +696,7 @@ /* {{{ php_wddx_push_element */ -static void php_wddx_push_element(void *user_data, const char *name, const char **atts) +static void php_wddx_push_element(void *user_data, const XML_Char *name, const XML_Char **atts) { st_entry ent; wddx_stack *stack = (wddx_stack *)user_data; @@ -884,7 +884,7 @@ /* {{{ php_wddx_pop_element */ -static void php_wddx_pop_element(void *user_data, const char *name) +static void php_wddx_pop_element(void *user_data, const XML_Char *name) { st_entry*ent1, *ent2; wddx_stack *stack = (wddx_stack *)user_data; @@ -1006,7 +1006,7 @@ /* {{{ php_wddx_process_data */ -static void php_wddx_process_data(void *user_data, const char *s, int len) +static void php_wddx_process_data(void *user_data, const XML_Char *s, int len) { st_entry *ent; wddx_stack *stack = (wddx_stack *)user_data; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/wddx wddx.c
moriyoshi Mon Oct 20 11:41:54 2003 EDT Modified files: /php-src/ext/wddx wddx.c Log: Fix compiler warnings Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.107 php-src/ext/wddx/wddx.c:1.108 --- php-src/ext/wddx/wddx.c:1.107 Mon Aug 11 20:55:55 2003 +++ php-src/ext/wddx/wddx.c Mon Oct 20 11:41:53 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.107 2003/08/12 00:55:55 iliaa Exp $ */ +/* $Id: wddx.c,v 1.108 2003/10/20 15:41:53 moriyoshi Exp $ */ #include "php.h" @@ -95,7 +95,7 @@ } wddx_stack; -static void php_wddx_process_data(void *user_data, const char *s, int len); +static void php_wddx_process_data(void *user_data, const XML_Char *s, int len); /* {{{ wddx_functions[] */ @@ -394,7 +394,7 @@ break; default: - if (iscntrl((int)*p)) { + if (iscntrl((int)*(unsigned char *)p)) { FLUSH_BUF(); sprintf(control_buf, WDDX_CHAR, *p); php_wddx_add_chunk(packet, control_buf); @@ -690,7 +690,7 @@ /* {{{ php_wddx_push_element */ -static void php_wddx_push_element(void *user_data, const char *name, const char **atts) +static void php_wddx_push_element(void *user_data, const XML_Char *name, const XML_Char **atts) { st_entry ent; wddx_stack *stack = (wddx_stack *)user_data; @@ -878,7 +878,7 @@ /* {{{ php_wddx_pop_element */ -static void php_wddx_pop_element(void *user_data, const char *name) +static void php_wddx_pop_element(void *user_data, const XML_Char *name) { st_entry*ent1, *ent2; wddx_stack *stack = (wddx_stack *)user_data; @@ -1000,7 +1000,7 @@ /* {{{ php_wddx_process_data */ -static void php_wddx_process_data(void *user_data, const char *s, int len) +static void php_wddx_process_data(void *user_data, const XML_Char *s, int len) { st_entry *ent; wddx_stack *stack = (wddx_stack *)user_data; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/libxml libxml.c
moriyoshi Mon Oct 20 11:33:41 2003 EDT Modified files: /php-src/ext/libxml libxml.c Log: Fix compiler warnings Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.5 php-src/ext/libxml/libxml.c:1.6 --- php-src/ext/libxml/libxml.c:1.5 Sun Oct 19 23:11:45 2003 +++ php-src/ext/libxml/libxml.c Mon Oct 20 11:33:40 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.5 2003/10/20 03:11:45 shane Exp $ */ +/* $Id: libxml.c,v 1.6 2003/10/20 15:33:40 moriyoshi Exp $ */ #define IS_EXT_MODULE @@ -31,6 +31,7 @@ #include "zend_variables.h" #include "ext/standard/php_string.h" #include "ext/standard/info.h" +#include "ext/standard/file.h" #if HAVE_LIBXML @@ -110,7 +111,6 @@ void *php_libxml_streams_IO_open_wrapper(const char *filename) { char resolved_path[MAXPATHLEN + 1]; - int file_exist; php_stream_statbuf ssbuf; php_stream_context *context = NULL; php_stream_wrapper *wrapper = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/mime_magic mime_magic.c
iliaa Mon Oct 20 10:37:03 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/mime_magic mime_magic.c Log: MFH: Fixed bug #25918 (Possible crash in mime_content_type()). Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.440 php-src/NEWS:1.1247.2.441 --- php-src/NEWS:1.1247.2.440 Mon Oct 20 10:22:10 2003 +++ php-src/NEWSMon Oct 20 10:37:01 2003 @@ -6,6 +6,7 @@ - Fixed multibyte regex engine to properly handle ".*" pattern under POSIX compatible mode. (K.Kosako , Moriyoshi) - Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia) +- Fixed bug #25918 (Possible crash in mime_content_type()). (Ilia) - Fixed bug #25895 (Incorrect detection of safe_mode limited ini options). (Ilia) - Fixed bug #25836 (last key of multi-dimensional array passed via GPC not Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.13.2.9 php-src/ext/mime_magic/mime_magic.c:1.13.2.10 --- php-src/ext/mime_magic/mime_magic.c:1.13.2.9Sun Feb 9 14:10:32 2003 +++ php-src/ext/mime_magic/mime_magic.c Mon Oct 20 10:37:02 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | +--+ - $Id: mime_magic.c,v 1.13.2.9 2003/02/09 19:10:32 sniper Exp $ + $Id: mime_magic.c,v 1.13.2.10 2003/10/20 14:37:02 iliaa Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -1848,9 +1848,8 @@ } /* detect memory allocation errors */ -if (!content_type || - (state == rsl_encoding && !*content_encoding)) { - return MIME_MAGIC_ERROR; +if (!content_type || !(*content_type) || (state == rsl_encoding && !*content_encoding)) { + return MIME_MAGIC_ERROR; } /* success! */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mime_magic mime_magic.c
iliaa Mon Oct 20 10:36:52 2003 EDT Modified files: /php-src/ext/mime_magic mime_magic.c Log: Fixed bug #25918 (Possible crash in mime_content_type()). Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.32 php-src/ext/mime_magic/mime_magic.c:1.33 --- php-src/ext/mime_magic/mime_magic.c:1.32Fri Sep 26 03:47:01 2003 +++ php-src/ext/mime_magic/mime_magic.c Mon Oct 20 10:36:51 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | +--+ - $Id: mime_magic.c,v 1.32 2003/09/26 07:47:01 hholzgra Exp $ + $Id: mime_magic.c,v 1.33 2003/10/20 14:36:51 iliaa Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -1954,9 +1954,8 @@ } /* detect memory allocation errors */ -if (!content_type || - (state == rsl_encoding && !*content_encoding)) { - return MIME_MAGIC_ERROR; +if (!content_type || !(*content_type) || (state == rsl_encoding && !*content_encoding)) { + return MIME_MAGIC_ERROR; } /* success! */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard mail.c
iliaa Mon Oct 20 10:22:11 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard mail.c /php-srcNEWS Log: MFH: Fixed bug #25923 (mail() modifies the to & subject arguments). Index: php-src/ext/standard/mail.c diff -u php-src/ext/standard/mail.c:1.66.2.10 php-src/ext/standard/mail.c:1.66.2.11 --- php-src/ext/standard/mail.c:1.66.2.10 Mon Oct 13 00:15:25 2003 +++ php-src/ext/standard/mail.c Mon Oct 20 10:22:10 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mail.c,v 1.66.2.10 2003/10/13 04:15:25 iliaa Exp $ */ +/* $Id: mail.c,v 1.66.2.11 2003/10/20 14:22:10 iliaa Exp $ */ #include #include @@ -86,6 +86,7 @@ char *subject=NULL, *extra_cmd=NULL; int to_len, message_len, headers_len; int subject_len, extra_cmd_len, i; + char *to_r, *subject_r; if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE."); @@ -103,45 +104,51 @@ } if (to_len > 0) { + to_r = estrndup(to, to_len); for (; to_len; to_len--) { - if (!isspace((unsigned char) to[to_len - 1])) { + if (!isspace((unsigned char) to_r[to_len - 1])) { break; } - to[to_len - 1] = '\0'; + to_r[to_len - 1] = '\0'; } - for (i = 0; to[i]; i++) { - if (iscntrl((unsigned char) to[i])) { + for (i = 0; to_r[i]; i++) { + if (iscntrl((unsigned char) to_r[i])) { /* According to RFC 822, section 3.1.1 long headers may be separated into * parts using CRLF followed at least one linear-white-space character ('\t' or ' '). * To prevent these separators from being replaced with a space, we use the * SKIP_LONG_HEADER_SEP to skip over them. */ - SKIP_LONG_HEADER_SEP(to, i); - to[i] = ' '; + SKIP_LONG_HEADER_SEP(to_r, i); + to_r[i] = ' '; } } + } else { + to_r = to; } if (subject_len > 0) { + subject_r = estrndup(subject, subject_len); for (; subject_len; subject_len--) { - if (!isspace((unsigned char) subject[subject_len - 1])) { + if (!isspace((unsigned char) subject_r[subject_len - 1])) { break; } - subject[subject_len - 1] = '\0'; + subject_r[subject_len - 1] = '\0'; } for(i = 0; subject[i]; i++) { - if (iscntrl((unsigned char) subject[i])) { - SKIP_LONG_HEADER_SEP(subject, i); - subject[i] = ' '; + if (iscntrl((unsigned char) subject_r[i])) { + SKIP_LONG_HEADER_SEP(subject_r, i); + subject_r[i] = ' '; } } + } else { + subject_r = subject; } if (extra_cmd) { extra_cmd = php_escape_shell_cmd(extra_cmd); } - if (php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) { + if (php_mail(to_r, subject_r, message, headers, extra_cmd TSRMLS_CC)) { RETVAL_TRUE; } else { RETVAL_FALSE; @@ -149,6 +156,12 @@ if (extra_cmd) { efree (extra_cmd); + } + if (to_len > 0) { + efree(to_r); + } + if (subject_len > 0) { + efree(subject_r); } } /* }}} */ Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.439 php-src/NEWS:1.1247.2.440 --- php-src/NEWS:1.1247.2.439 Sun Oct 19 21:59:47 2003 +++ php-src/NEWSMon Oct 20 10:22:10 2003 @@ -5,6 +5,7 @@ on request shutdown). (Wez) - Fixed multibyte regex engine to properly handle ".*" pattern under POSIX compatible mode. (K.Kosako , Moriyoshi) +- Fixed bug #25923 (mail() modifies the to & subject arguments). (Ilia) - Fixed bug #25895 (Incorrect detection of safe_mode limited ini options). (Ilia) - Fixed bug #25836 (last key of multi-dimensional array passed via GPC not -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard mail.c
iliaa Mon Oct 20 10:22:01 2003 EDT Modified files: /php-src/ext/standard mail.c Log: Fixed bug #25923 (mail() modifies the to & subject arguments). Index: php-src/ext/standard/mail.c diff -u php-src/ext/standard/mail.c:1.78 php-src/ext/standard/mail.c:1.79 --- php-src/ext/standard/mail.c:1.78Mon Oct 13 00:15:09 2003 +++ php-src/ext/standard/mail.c Mon Oct 20 10:22:01 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mail.c,v 1.78 2003/10/13 04:15:09 iliaa Exp $ */ +/* $Id: mail.c,v 1.79 2003/10/20 14:22:01 iliaa Exp $ */ #include #include @@ -87,6 +87,7 @@ int to_len, message_len, headers_len; int subject_len, extra_cmd_len, i; char *force_extra_parameters = INI_STR("mail_force_extra_parameters"); + char *to_r, *subject_r; if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE."); @@ -104,36 +105,40 @@ } if (to_len > 0) { + to_r = estrndup(to, to_len); for (; to_len; to_len--) { - if (!isspace((unsigned char) to[to_len - 1])) { + if (!isspace((unsigned char) to_r[to_len - 1])) { break; } - to[to_len - 1] = '\0'; + to_r[to_len - 1] = '\0'; } - for (i = 0; to[i]; i++) { - if (iscntrl((unsigned char) to[i])) { + for (i = 0; to_r[i]; i++) { + if (iscntrl((unsigned char) to_r[i])) { /* According to RFC 822, section 3.1.1 long headers may be separated into * parts using CRLF followed at least one linear-white-space character ('\t' or ' '). * To prevent these separators from being replaced with a space, we use the * SKIP_LONG_HEADER_SEP to skip over them. */ - SKIP_LONG_HEADER_SEP(to, i); - to[i] = ' '; + SKIP_LONG_HEADER_SEP(to_r, i); + to_r[i] = ' '; } } - } + } else { + to_r = to; + } if (subject_len > 0) { + subject_r = estrndup(subject, subject_len); for (; subject_len; subject_len--) { - if (!isspace((unsigned char) subject[subject_len - 1])) { + if (!isspace((unsigned char) subject_r[subject_len - 1])) { break; } - subject[subject_len - 1] = '\0'; + subject_r[subject_len - 1] = '\0'; } - for(i = 0; subject[i]; i++) { - if (iscntrl((unsigned char) subject[i])) { - SKIP_LONG_HEADER_SEP(subject, i); - subject[i] = ' '; + for(i = 0; subject_r[i]; i++) { + if (iscntrl((unsigned char) subject_r[i])) { + SKIP_LONG_HEADER_SEP(subject_r, i); + subject_r[i] = ' '; } } } @@ -144,7 +149,7 @@ extra_cmd = php_escape_shell_cmd(extra_cmd); } - if (php_mail(to, subject, message, headers, extra_cmd TSRMLS_CC)) { + if (php_mail(to_r, subject_r, message, headers, extra_cmd TSRMLS_CC)) { RETVAL_TRUE; } else { RETVAL_FALSE; @@ -152,6 +157,12 @@ if (extra_cmd) { efree (extra_cmd); + } + if (to_len > 0) { + efree(to_r); + } + if (subject_len > 0) { + efree(subject_r); } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php