[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Aug 13 20:34:07 2004 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1715r2=1.1716ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1715 php-src/ChangeLog:1.1716 --- php-src/ChangeLog:1.1715Thu Aug 12 20:33:44 2004 +++ php-src/ChangeLog Fri Aug 13 20:34:06 2004 @@ -1,3 +1,69 @@ +2004-08-13 Dan Kalowsky [EMAIL PROTECTED] + +* ext/odbc/php_odbc.c: + Checking in a patch by Dave Lawson ([EMAIL PROTECTED]) to correct + some of the behavior found in the odbc_fetch_*() functions. This patch + NEEDS to be tested on MS Access before a release is done with it. This + submission is to get it into the daily builds for testing. + +2004-08-13 Georg Richter [EMAIL PROTECTED] + +* (PHP_5_0) + NEWS + ext/mysqli/mysqli.c + ext/mysqli/mysqli.c: + fixed bug #29656 (segfault on result and statement properties) + +2004-08-13 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_0) + regex/engine.c + regex/regexec.c: + MFH: fix yet another annoying compile warning + +* regex/engine.c + regex/regexec.c: + fix yet another annoying compile warning + +* ext/iconv/iconv.c: + fix compile warning + +2004-08-13 Christian Stocker [EMAIL PROTECTED] + +* NEWS: + Forgot to add DomDocumentFragment-appendXML(), when I commited it back + then + +* NEWS + ext/dom/document.c + ext/dom/dom_properties.h + ext/dom/php_dom.c + ext/dom/xml_common.h: + Added DomDocument-recover property for parsing not well-formed XML + Documents. + +2004-08-13 Rob Richards [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS: + BFN + +* (PHP_4_3) + ext/domxml/php_domxml.c + ext/domxml/php_domxml.h: + Fixed bug #29599 (domxml_error segfaults another apache module) + +2004-08-13 Derick Rethans [EMAIL PROTECTED] + +* (PHP_5_0) + NEWS + main/main.c: + - MFH: Added PHP_EOL constant that contains the OS way of representing +newlines. (Patch by Paul Hudson) + +* main/main.c: + - Added the PHP_EOL constant (Patch by Paul Hudson) + 2004-08-12 Georg Richter [EMAIL PROTECTED] * ext/mysqli/mysqli_api.c @@ -8291,7 +8357,7 @@ 2004-03-18 Pierre-Alain Joye [EMAIL PROTECTED] * ext/gd/tests/bug27582_2.phpt: - - Fix the test description and $Id: ChangeLog,v 1.1715 2004/08/13 00:33:44 changelog Exp $ + - Fix the test description and $Id: ChangeLog,v 1.1716 2004/08/14 00:34:06 changelog Exp $ 2004-03-18 Derick Rethans [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /main main.c
derick Fri Aug 13 03:02:51 2004 EDT Modified files: /php-src/main main.c Log: - Added the PHP_EOL constant (Patch by Paul Hudson) http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.606r2=1.607ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.606 php-src/main/main.c:1.607 --- php-src/main/main.c:1.606 Sun Jul 25 03:14:49 2004 +++ php-src/main/main.c Fri Aug 13 03:02:50 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.606 2004/07/25 07:14:49 helly Exp $ */ +/* $Id: main.c,v 1.607 2004/08/13 07:02:50 derick Exp $ */ /* {{{ includes */ @@ -1430,6 +1430,7 @@ REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_PATH, PHP_CONFIG_FILE_PATH, sizeof(PHP_CONFIG_FILE_PATH)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_STRINGL_CONSTANT(PHP_SHLIB_SUFFIX, PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS); + REGISTER_MAIN_STRINGL_CONSTANT(PHP_EOL, PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS); php_output_register_constants(TSRMLS_C); php_rfc1867_register_constants(TSRMLS_C); -- 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 php_domxml.h
rrichards Fri Aug 13 07:38:04 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/domxml php_domxml.h php_domxml.c Log: Fixed bug #29599 (domxml_error segfaults another apache module) http://cvs.php.net/diff.php/php-src/ext/domxml/php_domxml.h?r1=1.72.4.5r2=1.72.4.6ty=u Index: php-src/ext/domxml/php_domxml.h diff -u php-src/ext/domxml/php_domxml.h:1.72.4.5 php-src/ext/domxml/php_domxml.h:1.72.4.6 --- php-src/ext/domxml/php_domxml.h:1.72.4.5Fri Sep 26 12:33:58 2003 +++ php-src/ext/domxml/php_domxml.h Fri Aug 13 07:38:03 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.h,v 1.72.4.5 2003/09/26 16:33:58 moriyoshi Exp $ */ +/* $Id: php_domxml.h,v 1.72.4.6 2004/08/13 11:38:03 rrichards Exp $ */ #ifndef PHP_DOMXML_H #define PHP_DOMXML_H @@ -75,6 +75,8 @@ /* directory functions */ PHP_MINIT_FUNCTION(domxml); PHP_MSHUTDOWN_FUNCTION(domxml); +PHP_RINIT_FUNCTION(domxml); +PHP_RSHUTDOWN_FUNCTION(domxml); PHP_MINFO_FUNCTION(domxml); PHP_FUNCTION(domxml_version); PHP_FUNCTION(xmldoc); http://cvs.php.net/diff.php/php-src/ext/domxml/php_domxml.c?r1=1.218.2.47r2=1.218.2.48ty=u Index: php-src/ext/domxml/php_domxml.c diff -u php-src/ext/domxml/php_domxml.c:1.218.2.47 php-src/ext/domxml/php_domxml.c:1.218.2.48 --- php-src/ext/domxml/php_domxml.c:1.218.2.47 Sat Jun 19 11:09:46 2004 +++ php-src/ext/domxml/php_domxml.c Fri Aug 13 07:38:03 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.218.2.47 2004/06/19 15:09:46 sesser Exp $ */ +/* $Id: php_domxml.c,v 1.218.2.48 2004/08/13 11:38:03 rrichards Exp $ */ /* TODO * - Support Notation Nodes @@ -540,8 +540,8 @@ domxml_functions, PHP_MINIT(domxml), PHP_MSHUTDOWN(domxml), - NULL, - NULL, + PHP_RINIT(domxml), + PHP_RSHUTDOWN(domxml), PHP_MINFO(domxml), DOMXML_API_VERSION, /* Extension versionnumber */ STANDARD_MODULE_PROPERTIES @@ -1510,6 +1510,24 @@ } +PHP_RINIT_FUNCTION(domxml) +{ + xmlSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error); +#if HAVE_DOMXSLT + xsltSetGenericErrorFunc(xsltGenericErrorContext, (xmlGenericErrorFunc)domxml_error); +#endif + return SUCCESS; +} + +PHP_RSHUTDOWN_FUNCTION(domxml) +{ + xmlSetGenericErrorFunc(xmlGenericErrorContext, NULL); +#if HAVE_DOMXSLT + xsltSetGenericErrorFunc(xsltGenericErrorContext, NULL); +#endif + return SUCCESS; +} + PHP_MSHUTDOWN_FUNCTION(domxml) { #if HAVE_DOMXSLT @@ -1668,15 +1686,9 @@ REGISTER_LONG_CONSTANT(DOMXML_LOAD_SUBSTITUTE_ENTITIES, DOMXML_LOAD_SUBSTITUTE_ENTITIES,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(DOMXML_LOAD_COMPLETE_ATTRS,DOMXML_LOAD_COMPLETE_ATTRS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(DOMXML_LOAD_DONT_KEEP_BLANKS,DOMXML_LOAD_DONT_KEEP_BLANKS, CONST_CS | CONST_PERSISTENT); - xmlSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error); -#if (defined(LIBXML_THREAD_ENABLED) LIBXML_VERSION = 20511) - xmlThrDefSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error); -#endif -#if HAVE_DOMXSLT - xsltSetGenericErrorFunc(xsltGenericErrorContext, (xmlGenericErrorFunc)domxml_error); -#if HAVE_DOMEXSLT + +#if HAVE_DOMXSLT HAVE_DOMEXSLT exsltRegisterAll(); -#endif #endif xmlInitParser(); return 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
rrichards Fri Aug 13 07:38:48 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: BFN http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.714r2=1.1247.2.715ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.714 php-src/NEWS:1.1247.2.715 --- php-src/NEWS:1.1247.2.714 Wed Aug 11 18:40:46 2004 +++ php-src/NEWSFri Aug 13 07:38:48 2004 @@ -1,5 +1,8 @@ PHP 4 NEWS ||| +?? ??? 2004, Version 4.3.9 +- Fixed bug #29599 (domxml_error segfaults another apache module). (Rob) + 11 Aug 2004, Version 4.3.9RC1 - Rewritten UNIX and Windows install help files. (Documentation Team) - Updated PCRE to provide better error handling in certain cases. (Andrei) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /ext/dom document.c dom_properties.h php_dom.c xml_common.h
chregu Fri Aug 13 08:32:55 2004 EDT Modified files: /php-srcNEWS /php-src/ext/domdocument.c dom_properties.h php_dom.c xml_common.h Log: Added DomDocument-recover property for parsing not well-formed XML Documents. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1790r2=1.1791ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1790 php-src/NEWS:1.1791 --- php-src/NEWS:1.1790 Tue Aug 10 13:39:59 2004 +++ php-src/NEWSFri Aug 13 08:32:55 2004 @@ -24,6 +24,8 @@ . mysqli-client_info property (Georg) . inet_pton() (Sara) . inet_ntop() (Sara) +- Added DomDocument-recover property for parsing not well-formed + XML Documents. (Christian) - Added Cursor support for MySQL 5.0.x in mysqli (Georg) - Added proxy support to ftp wrapper via http. (Sara) - Added MDTM support to ftp_url_stat. (Sara) http://cvs.php.net/diff.php/php-src/ext/dom/document.c?r1=1.56r2=1.57ty=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.56 php-src/ext/dom/document.c:1.57 --- php-src/ext/dom/document.c:1.56 Sun Jul 18 09:16:15 2004 +++ php-src/ext/dom/document.c Fri Aug 13 08:32:55 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: document.c,v 1.56 2004/07/18 13:16:15 rrichards Exp $ */ +/* $Id: document.c,v 1.57 2004/08/13 12:32:55 chregu Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -614,6 +614,48 @@ } /* }}} */ +/* {{{ proto recover boolean +readonly=no +*/ +int dom_document_recover_read(dom_object *obj, zval **retval TSRMLS_DC) +{ + dom_doc_props *doc_prop; + + ALLOC_ZVAL(*retval); + if (obj-document) { + doc_prop = dom_get_doc_props(obj-document); + ZVAL_BOOL(*retval, doc_prop-recover); + } else { + ZVAL_FALSE(*retval); + } + return SUCCESS; +} + +int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC) +{ + zval value_copy; + dom_doc_props *doc_prop; + + if(newval-refcount 1) { + value_copy = *newval; + zval_copy_ctor(value_copy); + newval = value_copy; + } + convert_to_boolean(newval); + + if (obj-document) { + doc_prop = dom_get_doc_props(obj-document); + doc_prop-recover = Z_LVAL_P(newval); + } + + if (newval == value_copy) { + zval_dtor(newval); + } + + return SUCCESS; +} +/* }}} */ + /* {{{ proto substituteEntitiesboolean readonly=no @@ -1392,7 +1434,7 @@ dom_doc_props *doc_props; dom_object *intern; php_libxml_ref_obj *document = NULL; - int validate, resolve_externals, keep_blanks, substitute_ent; + int validate, recover, resolve_externals, keep_blanks, substitute_ent; int resolved_path_len; char *directory=NULL, resolved_path[MAXPATHLEN]; @@ -1406,6 +1448,7 @@ resolve_externals = doc_props-resolveexternals; keep_blanks = doc_props-preservewhitespace; substitute_ent = doc_props-substituteentities; + recover = doc_props-recover; if (document == NULL) { efree(doc_props); @@ -1455,7 +1498,7 @@ } } - ctxt-recovery = 0; + ctxt-recovery = recover; ctxt-validate = validate; ctxt-loadsubset = (resolve_externals * XML_COMPLETE_ATTRS); ctxt-replaceEntities = substitute_ent; @@ -1470,7 +1513,7 @@ xmlParseDocument(ctxt); - if (ctxt-wellFormed) { + if (ctxt-wellFormed || recover) { ret = ctxt-myDoc; /* If loading from memory, set the base reference uri for the document */ if (ret-URL == NULL ctxt-directory != NULL) { http://cvs.php.net/diff.php/php-src/ext/dom/dom_properties.h?r1=1.5r2=1.6ty=u Index: php-src/ext/dom/dom_properties.h diff -u php-src/ext/dom/dom_properties.h:1.5 php-src/ext/dom/dom_properties.h:1.6 --- php-src/ext/dom/dom_properties.h:1.5Thu Jan 8 12:32:03 2004 +++ php-src/ext/dom/dom_properties.hFri Aug 13 08:32:55 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dom_properties.h,v 1.5 2004/01/08 17:32:03 sniper Exp $ */ +/* $Id: dom_properties.h,v 1.6 2004/08/13 12:32:55 chregu Exp $ */ #ifndef DOM_PROPERTIES_H #define DOM_PROPERTIES_H @@ -59,6 +59,8 @@ int dom_document_resolve_externals_write(dom_object *obj, zval *newval TSRMLS_DC); int dom_document_preserve_whitespace_read(dom_object *obj, zval **retval TSRMLS_DC); int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_DC); +int dom_document_recover_read(dom_object *obj, zval **retval TSRMLS_DC); +int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC); int dom_document_substitue_entities_read(dom_object *obj, zval **retval TSRMLS_DC); int
[PHP-CVS] cvs: php-src /regex engine.c regexec.c
tony2001Fri Aug 13 10:59:59 2004 EDT Modified files: /php-src/regex engine.c regexec.c Log: fix yet another annoying compile warning http://cvs.php.net/diff.php/php-src/regex/engine.c?r1=1.4r2=1.5ty=u Index: php-src/regex/engine.c diff -u php-src/regex/engine.c:1.4 php-src/regex/engine.c:1.5 --- php-src/regex/engine.c:1.4 Mon Sep 29 20:26:03 2003 +++ php-src/regex/engine.c Fri Aug 13 10:59:58 2004 @@ -270,7 +270,7 @@ /* figure out what it matched */ switch (OP(m-g-strip[ss])) { case OEND: - assert(nope); + assert(PHP_REGEX_NOPE); break; case OCHAR: sp++; @@ -286,7 +286,7 @@ break; case OBACK_: case O_BACK: - assert(nope); + assert(PHP_REGEX_NOPE); break; /* cases where length of match is hard to find */ case OQUEST_: @@ -389,7 +389,7 @@ case OOR1: case OOR2: case O_CH: - assert(nope); + assert(PHP_REGEX_NOPE); break; case OLPAREN: i = OPND(m-g-strip[ss]); @@ -402,7 +402,7 @@ m-pmatch[i].rm_eo = sp - m-offp; break; default:/* uh oh */ - assert(nope); + assert(PHP_REGEX_NOPE); break; } } @@ -606,12 +606,12 @@ return(NULL); break; default:/* uh oh */ - assert(nope); + assert(PHP_REGEX_NOPE); break; } /* can't happen */ - assert(nope); + assert(PHP_REGEX_NOPE); /* NOTREACHED */ return((unsigned char *)NULL); /* dummy */ } @@ -914,7 +914,7 @@ FWD(aft, aft, 1); break; default:/* ops... */ - assert(nope); + assert(PHP_REGEX_NOPE); break; } } http://cvs.php.net/diff.php/php-src/regex/regexec.c?r1=1.3r2=1.4ty=u Index: php-src/regex/regexec.c diff -u php-src/regex/regexec.c:1.3 php-src/regex/regexec.c:1.4 --- php-src/regex/regexec.c:1.3 Mon Sep 29 20:26:03 2003 +++ php-src/regex/regexec.c Fri Aug 13 10:59:58 2004 @@ -16,7 +16,7 @@ #include utils.h #include regex2.h -static int nope = 0; /* for use in asserts; shuts lint up */ +#define PHP_REGEX_NOPE 0; /* for use in asserts; shuts lint up */ /* macros for manipulating states, small version */ #definestates unsigned -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /regex engine.c regexec.c
tony2001Fri Aug 13 11:02:05 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/regex engine.c regexec.c Log: MFH: fix yet another annoying compile warning http://cvs.php.net/diff.php/php-src/regex/engine.c?r1=1.4r2=1.4.2.1ty=u Index: php-src/regex/engine.c diff -u php-src/regex/engine.c:1.4 php-src/regex/engine.c:1.4.2.1 --- php-src/regex/engine.c:1.4 Mon Sep 29 20:26:03 2003 +++ php-src/regex/engine.c Fri Aug 13 11:02:04 2004 @@ -270,7 +270,7 @@ /* figure out what it matched */ switch (OP(m-g-strip[ss])) { case OEND: - assert(nope); + assert(PHP_REGEX_NOPE); break; case OCHAR: sp++; @@ -286,7 +286,7 @@ break; case OBACK_: case O_BACK: - assert(nope); + assert(PHP_REGEX_NOPE); break; /* cases where length of match is hard to find */ case OQUEST_: @@ -389,7 +389,7 @@ case OOR1: case OOR2: case O_CH: - assert(nope); + assert(PHP_REGEX_NOPE); break; case OLPAREN: i = OPND(m-g-strip[ss]); @@ -402,7 +402,7 @@ m-pmatch[i].rm_eo = sp - m-offp; break; default:/* uh oh */ - assert(nope); + assert(PHP_REGEX_NOPE); break; } } @@ -606,12 +606,12 @@ return(NULL); break; default:/* uh oh */ - assert(nope); + assert(PHP_REGEX_NOPE); break; } /* can't happen */ - assert(nope); + assert(PHP_REGEX_NOPE); /* NOTREACHED */ return((unsigned char *)NULL); /* dummy */ } @@ -914,7 +914,7 @@ FWD(aft, aft, 1); break; default:/* ops... */ - assert(nope); + assert(PHP_REGEX_NOPE); break; } } http://cvs.php.net/diff.php/php-src/regex/regexec.c?r1=1.3r2=1.3.2.1ty=u Index: php-src/regex/regexec.c diff -u php-src/regex/regexec.c:1.3 php-src/regex/regexec.c:1.3.2.1 --- php-src/regex/regexec.c:1.3 Mon Sep 29 20:26:03 2003 +++ php-src/regex/regexec.c Fri Aug 13 11:02:05 2004 @@ -16,7 +16,7 @@ #include utils.h #include regex2.h -static int nope = 0; /* for use in asserts; shuts lint up */ +#define PHP_REGEX_NOPE 0; /* for use in asserts; shuts lint up */ /* macros for manipulating states, small version */ #definestates unsigned -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
wez Fri Aug 13 11:33:09 2004 EDT Modified files: /CVSROOTavail Log: xattr karma for Marcin http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.899r2=1.900ty=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.899 CVSROOT/avail:1.900 --- CVSROOT/avail:1.899 Thu Aug 12 14:34:55 2004 +++ CVSROOT/avail Fri Aug 13 11:33:09 2004 @@ -205,6 +205,7 @@ avail|mg|pecl/lzf avail|mg|pecl/tcpwrap avail|mg|pecl/xdiff +avail|mg|pecl/xattr avail|xnoguer|pecl/valkyrie avail|hfuecks|pear/XML_HTMLSax,pear/XML_SaxFilters,pear/Calendar avail|hj|pear/Locale_Maketext -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
georg Fri Aug 13 12:25:30 2004 EDT Modified files: /php-src/ext/mysqli mysqli.c Log: fixed bug #29656 (segfault on result and statement properties) http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.49r2=1.50ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.49 php-src/ext/mysqli/mysqli.c:1.50 --- php-src/ext/mysqli/mysqli.c:1.49Mon Aug 9 00:34:01 2004 +++ php-src/ext/mysqli/mysqli.c Fri Aug 13 12:25:29 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.49 2004/08/09 04:34:01 georg Exp $ + $Id: mysqli.c,v 1.50 2004/08/13 16:25:29 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -200,11 +200,22 @@ ret = zend_hash_find(obj-prop_handler, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) hnd); } if (ret == SUCCESS) { - /* check if connection is still valid */ - if (!obj-ptr || - !((MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj-ptr))-ptr)-mysql)-thread_id) { - retval = EG(uninitialized_zval_ptr); - return(retval); + + /* check if mysqli object is still valid */ + if (!strcmp(obj-zo.ce-name, mysqli)) { + if (!obj-ptr || + !((MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj-ptr))-ptr)-mysql)-thread_id) { + retval = EG(uninitialized_zval_ptr); + return(retval); + } + } else + /* check if stmt object is still valid */ + if (!strcmp(obj-zo.ce-name, mysqli_stmt)) { + if (!obj-ptr || + !((MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj-ptr))-ptr)-stmt)-mysql) { + retval = EG(uninitialized_zval_ptr); + return(retval); + } } ret = hnd-read_func(obj, retval TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/mysqli mysqli.c
georg Fri Aug 13 12:27:35 2004 EDT Modified files: (Branch: PHP_5_0) /php-srcNEWS /php-src/ext/mysqli mysqli.c Log: fixed bug #29656 (segfault on result and statement properties) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.40r2=1.1760.2.41ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.40 php-src/NEWS:1.1760.2.41 --- php-src/NEWS:1.1760.2.40Fri Aug 13 03:08:45 2004 +++ php-src/NEWSFri Aug 13 12:27:35 2004 @@ -3,6 +3,7 @@ ?? ??? 2004, PHP 5.0.2 - Added PHP_EOL constant that contains the OS way of representing newlines. (Paul Hudson, Derick) +- Fixed bug #29656 (segfault on result and statement properties) (Georg) 12 Aug 2004, PHP 5.0.1 - Changed destructor mechanism so that destructors are called prior to request http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.43.2.3r2=1.43.2.4ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.43.2.3 php-src/ext/mysqli/mysqli.c:1.43.2.4 --- php-src/ext/mysqli/mysqli.c:1.43.2.3Mon Aug 9 00:33:40 2004 +++ php-src/ext/mysqli/mysqli.c Fri Aug 13 12:27:35 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.43.2.3 2004/08/09 04:33:40 georg Exp $ + $Id: mysqli.c,v 1.43.2.4 2004/08/13 16:27:35 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -200,11 +200,21 @@ ret = zend_hash_find(obj-prop_handler, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) hnd); } if (ret == SUCCESS) { - /* check if connection is still valid */ - if (!obj-ptr || - !((MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj-ptr))-ptr)-mysql)-thread_id) { - retval = EG(uninitialized_zval_ptr); - return(retval); + /* check if mysqli object is still valid */ + if (!strcmp(obj-zo.ce-name, mysqli)) { + if (!obj-ptr || + !((MYSQL *)((MY_MYSQL *)((MYSQLI_RESOURCE *)(obj-ptr))-ptr)-mysql)-thread_id) { + retval = EG(uninitialized_zval_ptr); + return(retval); + } + } else + /* check if stmt object is still valid */ + if (!strcmp(obj-zo.ce-name, mysqli_stmt)) { + if (!obj-ptr || + !((MYSQL_STMT *)((MY_STMT *)((MYSQLI_RESOURCE *)(obj-ptr))-ptr)-stmt)-mysql) { + retval = EG(uninitialized_zval_ptr); + return(retval); + } } ret = hnd-read_func(obj, retval TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c
kalowskyFri Aug 13 15:33:25 2004 EDT Modified files: /php-src/ext/odbc php_odbc.c Log: Checking in a patch by Dave Lawson ([EMAIL PROTECTED]) to correct some of the behavior found in the odbc_fetch_*() functions. This patch NEEDS to be tested on MS Access before a release is done with it. This submission is to get it into the daily builds for testing. http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.180r2=1.181ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.180 php-src/ext/odbc/php_odbc.c:1.181 --- php-src/ext/odbc/php_odbc.c:1.180 Mon Jul 19 03:19:41 2004 +++ php-src/ext/odbc/php_odbc.c Fri Aug 13 15:33:24 2004 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.180 2004/07/19 07:19:41 andi Exp $ */ +/* $Id: php_odbc.c,v 1.181 2004/08/13 19:33:24 kalowsky Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -846,7 +846,7 @@ convert_to_string_ex(pv_query); query = Z_STRVAL_PP(pv_query); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); result-numparams = 0; @@ -1269,7 +1269,7 @@ convert_to_string_ex(pv_query); query = Z_STRVAL_PP(pv_query); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -2797,7 +2797,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -2881,7 +2881,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -2961,7 +2961,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3038,7 +3038,7 @@ fschema = Z_STRVAL_PP(pv_fschema); convert_to_string_ex(pv_ftable); ftable = Z_STRVAL_PP(pv_ftable); -#if defined(HAVE_DBMAKER) || defined (HAVE_IBMDB2) +#if defined(HAVE_DBMAKER) || defined(HAVE_IBMDB2) #define EMPTY_TO_NULL(xstr) \ if ((int)strlen((xstr)) == 0) (xstr) = NULL @@ -3055,7 +3055,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3130,7 +3130,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3198,7 +3198,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3276,7 +3276,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3354,7 +3354,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn-hdbc, (result-stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3436,7 +3436,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); +
Re: [PHP-CVS] cvs: php-src /ext/iconv iconv.c
Antony Dovgal wrote: #include config.h @@ -2457,7 +2457,7 @@ while (icnt 0) { if ((ps == NULL ? iconv(self-cd, NULL, NULL, pd, ocnt): - iconv(self-cd, ps, icnt, pd, ocnt)) == (size_t)-1) { + iconv(self-cd, (char **)ps, icnt, pd, ocnt)) == (size_t)-1) { #if ICONV_SUPPORTS_ERRNO switch (errno) { case EILSEQ: I'm afraid it doesn't make much sense. Please have a look at http://marc.theaimsgroup.com/?l=php-devm=10627977767w=2 and consider reverting. Moriyoshi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php