[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sun Dec 31 01:30:56 2006 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2557r2=1.2558diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2557 php-src/ChangeLog:1.2558 --- php-src/ChangeLog:1.2557Sat Dec 30 01:31:01 2006 +++ php-src/ChangeLog Sun Dec 31 01:30:55 2006 @@ -1,3 +1,68 @@ +2006-12-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_4_4) + ext/sysvshm/sysvshm.c: + MFH: Added missing resource validation checks + +* (PHP_5_2) + ext/sysvshm/sysvshm.c: + Added missing resource validation checks + +* ext/shmop/shmop.c: + MFB: Added missing resource type checks + +* (PHP_5_2) + ext/shmop/shmop.c: + Added missing resource type checks + +2006-12-30 Rob Richards [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS: + BFN + +* ext/simplexml/simplexml.c + ext/simplexml/tests/bug39760.phpt: + MFB: fix bug #39760 (cloning fails on nested SimpleXML-Object) + add test + +* (PHP_5_2) + ext/simplexml/simplexml.c + ext/simplexml/tests/bug39760.phpt + ext/simplexml/tests/bug39760.phpt: + fix bug #39760 (cloning fails on nested SimpleXML-Object) + add test + +2006-12-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + ext/xsl/xsltprocessor.c: + + C++ comment + +* ext/standard/tests/strings/pack.phpt: + MFB: Mark test as being 32bit only + +* (PHP_5_2) + ext/standard/tests/strings/pack.phpt: + + Mark test as being 32bit only + +* (PHP_5_2) + ZendEngine2/zend_operators.c: + + Simplify optimize code + + +* ext/filter/logical_filters.c: + + MFB: Fixes test #50 + +* (PHP_5_2) + ext/filter/logical_filters.c: + + Fixes test #50 + 2006-12-29 Ilia Alshanetsky [EMAIL PROTECTED] * (PHP_4_4)
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Sun Dec 31 01:30:58 2006 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1047r2=1.1048diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1047 ZendEngine2/ChangeLog:1.1048 --- ZendEngine2/ChangeLog:1.1047Fri Dec 29 01:30:58 2006 +++ ZendEngine2/ChangeLog Sun Dec 31 01:30:58 2006 @@ -1,3 +1,11 @@ +2006-12-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + zend_operators.c: + + Simplify optimize code + + 2006-12-28 Antony Dovgal [EMAIL PROTECTED] * (PHP_5_2) @@ -16401,7 +16409,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1047 2006/12/29 01:30:58 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1048 2006/12/31 01:30:58 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -18125,7 +18133,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1047 2006/12/29 01:30:58 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1048 2006/12/31 01:30:58 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c /ext/simplexml/tests bug39760.phpt
rrichards Sat Dec 30 15:41:17 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/simplexml/testsbug39760.phpt Modified files: /php-src/ext/simplexml simplexml.c Log: fix bug #39760 (cloning fails on nested SimpleXML-Object) add test http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.18r2=1.151.2.22.2.19diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.18 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.19 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.18 Wed Nov 29 22:53:26 2006 +++ php-src/ext/simplexml/simplexml.c Sat Dec 30 15:41:17 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.18 2006/11/29 22:53:26 tony2001 Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.19 2006/12/30 15:41:17 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1761,6 +1761,16 @@ clone-document-refcount++; docp = clone-document-ptr; } + + clone-iter.isprefix = sxe-iter.isprefix; + if (sxe-iter.name != NULL) { + clone-iter.name = xmlStrdup((xmlChar *)sxe-iter.name); + } + if (sxe-iter.nsprefix != NULL) { + clone-iter.nsprefix = xmlStrdup((xmlChar *)sxe-iter.nsprefix); + } + clone-iter.type = sxe-iter.type; + if (sxe-node) { nodep = xmlDocCopyNode(sxe-node-node, docp, 1); } @@ -2332,7 +2342,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.18 $); + php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.19 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug39760.phpt?view=markuprev=1.1 Index: php-src/ext/simplexml/tests/bug39760.phpt +++ php-src/ext/simplexml/tests/bug39760.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c /ext/simplexml/tests bug39760.phpt
rrichards Sat Dec 30 15:42:24 2006 UTC Modified files: /php-src/ext/simplexml simplexml.c /php-src/ext/simplexml/testsbug39760.phpt Log: MFB: fix bug #39760 (cloning fails on nested SimpleXML-Object) add test http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.224r2=1.225diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.224 php-src/ext/simplexml/simplexml.c:1.225 --- php-src/ext/simplexml/simplexml.c:1.224 Wed Nov 29 22:53:21 2006 +++ php-src/ext/simplexml/simplexml.c Sat Dec 30 15:42:24 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.224 2006/11/29 22:53:21 tony2001 Exp $ */ +/* $Id: simplexml.c,v 1.225 2006/12/30 15:42:24 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1783,6 +1783,16 @@ clone-document-refcount++; docp = clone-document-ptr; } + + clone-iter.isprefix = sxe-iter.isprefix; + if (sxe-iter.name != NULL) { + clone-iter.name = xmlStrdup((xmlChar *)sxe-iter.name); + } + if (sxe-iter.nsprefix != NULL) { + clone-iter.nsprefix = xmlStrdup((xmlChar *)sxe-iter.nsprefix); + } + clone-iter.type = sxe-iter.type; + if (sxe-node) { nodep = xmlDocCopyNode(sxe-node-node, docp, 1); } @@ -2362,7 +2372,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.224 $); + php_info_print_table_row(2, Revision, $Revision: 1.225 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug39760.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/simplexml/tests/bug39760.phpt diff -u /dev/null php-src/ext/simplexml/tests/bug39760.phpt:1.2 --- /dev/null Sat Dec 30 15:42:24 2006 +++ php-src/ext/simplexml/tests/bug39760.phpt Sat Dec 30 15:42:24 2006 @@ -0,0 +1,55 @@ +--TEST-- +Bug #39760 (cloning fails on nested SimpleXML-Object) +--SKIPIF-- +?php if (!extension_loaded(simplexml)) print skip simplexml extension is not loaded; ? +--FILE-- +?php + +$xml = b'?xml version=1.0 ? +test +level1 +level2atext1/level2a +level2btext2/level2b + /level1 +/test'; +$test = simplexml_load_string($xml); + +var_dump($test-level1-level2a); + +$test2 = clone $test; +var_dump($test2-level1-level2a); + +$test3 = clone $test-level1-level2a; +var_dump($test3); + +echo Done\n; +? +--EXPECTF-- +object(SimpleXMLElement)#%d (1) { + [0]= + string(5) text1 +} +object(SimpleXMLElement)#%d (1) { + [0]= + string(5) text1 +} +object(SimpleXMLElement)#%d (1) { + [0]= + string(5) text1 +} +Done + +--UEXPECTF-- +object(SimpleXMLElement)#%d (1) { + [0]= + unicode(5) text1 +} +object(SimpleXMLElement)#%d (1) { + [0]= + unicode(5) text1 +} +object(SimpleXMLElement)#%d (1) { + [0]= + unicode(5) text1 +} +Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
rrichards Sat Dec 30 15:43:10 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.464r2=1.2027.2.547.2.465diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.464 php-src/NEWS:1.2027.2.547.2.465 --- php-src/NEWS:1.2027.2.547.2.464 Fri Dec 29 00:34:29 2006 +++ php-src/NEWSSat Dec 30 15:43:10 2006 @@ -42,6 +42,7 @@ are set to 0). (Dmitry) - Fixed bug #39825 (foreach produces memory error). (Dmitry) - Fixed bug #39815 (SOAP double encoding is not locale-independent). (Dmitry) +- Fixed bug #39760 (cloning fails on nested SimpleXML-Object). (Rob) - Fixed bug #39685 (iconv() - undefined function). (Hannes) - Fixed bug #39596 (Creating Variant of type VT_ARRAY). (Rob) - Fixed bug #39435 ('foo' instanceof bar gives invalid opcode error). (Sara) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/shmop shmop.c
iliaa Sat Dec 30 20:21:25 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/shmop shmop.c Log: Added missing resource type checks http://cvs.php.net/viewvc.cgi/php-src/ext/shmop/shmop.c?r1=1.31.2.2.2.1r2=1.31.2.2.2.2diff_format=u Index: php-src/ext/shmop/shmop.c diff -u php-src/ext/shmop/shmop.c:1.31.2.2.2.1 php-src/ext/shmop/shmop.c:1.31.2.2.2.2 --- php-src/ext/shmop/shmop.c:1.31.2.2.2.1 Fri Nov 3 14:46:48 2006 +++ php-src/ext/shmop/shmop.c Sat Dec 30 20:21:25 2006 @@ -16,7 +16,7 @@ | Ilia Alshanetsky [EMAIL PROTECTED] | +--+ */ -/* $Id: shmop.c,v 1.31.2.2.2.1 2006/11/03 14:46:48 bjori Exp $ */ +/* $Id: shmop.c,v 1.31.2.2.2.2 2006/12/30 20:21:25 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -78,6 +78,16 @@ ZEND_GET_MODULE(shmop) #endif +#define PHP_SHMOP_GET_RES \ + shmop = zend_list_find(shmid, type); \ + if (!shmop) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); \ + RETURN_FALSE; \ + } else if (type != shm_type) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, not a shmop resource);\ + RETURN_FALSE; \ + } \ + /* {{{ rsclean */ static void rsclean(zend_rsrc_list_entry *rsrc TSRMLS_DC) @@ -201,13 +211,8 @@ return; } - shmop = zend_list_find(shmid, type); + PHP_SHMOP_GET_RES - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } - if (start 0 || start shmop-size) { php_error_docref(NULL TSRMLS_CC, E_WARNING, start is out of range); RETURN_FALSE; @@ -241,12 +246,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES zend_list_delete(shmid); } @@ -264,12 +264,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES RETURN_LONG(shmop-size); } @@ -290,12 +285,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES if ((shmop-shmatflg SHM_RDONLY) == SHM_RDONLY) { php_error_docref(NULL TSRMLS_CC, E_WARNING, trying to write to a read only segment); @@ -326,12 +316,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES if (shmctl(shmop-shmid, IPC_RMID, NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, can't mark segment for deletion (are you the owner?)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/shmop shmop.c
iliaa Sat Dec 30 20:21:39 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/shmop shmop.c Log: MFH: Added missing resource type checks http://cvs.php.net/viewvc.cgi/php-src/ext/shmop/shmop.c?r1=1.23.8.3.2.1r2=1.23.8.3.2.2diff_format=u Index: php-src/ext/shmop/shmop.c diff -u php-src/ext/shmop/shmop.c:1.23.8.3.2.1 php-src/ext/shmop/shmop.c:1.23.8.3.2.2 --- php-src/ext/shmop/shmop.c:1.23.8.3.2.1 Sun Jan 1 13:46:56 2006 +++ php-src/ext/shmop/shmop.c Sat Dec 30 20:21:39 2006 @@ -16,7 +16,7 @@ | Ilia Alshanetsky [EMAIL PROTECTED] | +--+ */ -/* $Id: shmop.c,v 1.23.8.3.2.1 2006/01/01 13:46:56 sniper Exp $ */ +/* $Id: shmop.c,v 1.23.8.3.2.2 2006/12/30 20:21:39 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -78,6 +78,16 @@ ZEND_GET_MODULE(shmop) #endif +#define PHP_SHMOP_GET_RES \ + shmop = zend_list_find(shmid, type); \ + if (!shmop) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); \ + RETURN_FALSE; \ + } else if (type != shm_type) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, not a shmop resource);\ + RETURN_FALSE; \ + } \ + /* {{{ rsclean */ static void rsclean(zend_rsrc_list_entry *rsrc TSRMLS_DC) @@ -210,13 +220,8 @@ WRONG_PARAM_COUNT; } - shmop = zend_list_find(shmid, type); + PHP_SHMOP_GET_RES - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } - if (start 0 || start shmop-size) { php_error_docref(NULL TSRMLS_CC, E_WARNING, start is out of range); RETURN_FALSE; @@ -255,12 +260,7 @@ WRONG_PARAM_COUNT; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES zend_list_delete(shmid); } @@ -278,12 +278,7 @@ WRONG_PARAM_COUNT; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES RETURN_LONG(shmop-size); } @@ -304,12 +299,7 @@ WRONG_PARAM_COUNT; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES if ((shmop-shmatflg SHM_RDONLY) == SHM_RDONLY) { php_error_docref(NULL TSRMLS_CC, E_WARNING, trying to write to a read only segment); @@ -340,12 +330,7 @@ WRONG_PARAM_COUNT; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES if (shmctl(shmop-shmid, IPC_RMID, NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, can't mark segment for deletion (are you the owner?)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/shmop shmop.c
iliaa Sat Dec 30 20:21:47 2006 UTC Modified files: /php-src/ext/shmop shmop.c Log: MFB: Added missing resource type checks http://cvs.php.net/viewvc.cgi/php-src/ext/shmop/shmop.c?r1=1.36r2=1.37diff_format=u Index: php-src/ext/shmop/shmop.c diff -u php-src/ext/shmop/shmop.c:1.36 php-src/ext/shmop/shmop.c:1.37 --- php-src/ext/shmop/shmop.c:1.36 Sat Oct 7 22:55:18 2006 +++ php-src/ext/shmop/shmop.c Sat Dec 30 20:21:47 2006 @@ -16,7 +16,7 @@ | Ilia Alshanetsky [EMAIL PROTECTED] | +--+ */ -/* $Id: shmop.c,v 1.36 2006/10/07 22:55:18 bjori Exp $ */ +/* $Id: shmop.c,v 1.37 2006/12/30 20:21:47 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -78,6 +78,16 @@ ZEND_GET_MODULE(shmop) #endif +#define PHP_SHMOP_GET_RES \ + shmop = zend_list_find(shmid, type); \ + if (!shmop) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); \ + RETURN_FALSE; \ + } else if (type != shm_type) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, not a shmop resource);\ + RETURN_FALSE; \ + } \ + /* {{{ rsclean */ static void rsclean(zend_rsrc_list_entry *rsrc TSRMLS_DC) @@ -219,13 +229,8 @@ return; } - shmop = zend_list_find(shmid, type); + PHP_SHMOP_GET_RES - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } - if (start 0 || start shmop-size) { php_error_docref(NULL TSRMLS_CC, E_WARNING, start is out of range); RETURN_FALSE; @@ -259,12 +264,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES zend_list_delete(shmid); } @@ -282,12 +282,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES RETURN_LONG(shmop-size); } @@ -308,12 +303,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES if ((shmop-shmatflg SHM_RDONLY) == SHM_RDONLY) { php_error_docref(NULL TSRMLS_CC, E_WARNING, trying to write to a read only segment); @@ -344,12 +334,7 @@ return; } - shmop = zend_list_find(shmid, type); - - if (!shmop) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, no shared memory segment with an id of [%lu], shmid); - RETURN_FALSE; - } + PHP_SHMOP_GET_RES if (shmctl(shmop-shmid, IPC_RMID, NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, can't mark segment for deletion (are you the owner?)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
mj Sat Dec 30 20:22:18 2006 UTC Modified files: /CVSROOTavail Log: * Karma for Andrew Teixeira. http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1229r2=1.1230diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1229 CVSROOT/avail:1.1230 --- CVSROOT/avail:1.1229Thu Dec 28 21:45:26 2006 +++ CVSROOT/avail Sat Dec 30 20:22:18 2006 @@ -155,7 +155,7 @@ avail|sterling,derick,imajes,phanto,sebastian,helly,jan|pecl/adt avail|beckerr,val,shire|pecl/apc -avail|atex|pecl/rpmreader +avail|atex|pecl/rpmreader,pear/Net_MAC,peardoc avail|wez,sterling,edink,derick,tal,bs,magnus|embed,embed-web avail|hholzgra,stas,derick|functable avail|alan_k|php-gtk/ext/gtkhtml,php-gtk/ext/scintilla -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/sysvshm sysvshm.c
iliaa Sat Dec 30 20:46:47 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/sysvshmsysvshm.c Log: Added missing resource validation checks http://cvs.php.net/viewvc.cgi/php-src/ext/sysvshm/sysvshm.c?r1=1.70.2.2.2.1r2=1.70.2.2.2.2diff_format=u Index: php-src/ext/sysvshm/sysvshm.c diff -u php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.1 php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.2 --- php-src/ext/sysvshm/sysvshm.c:1.70.2.2.2.1 Thu Jun 29 09:03:27 2006 +++ php-src/ext/sysvshm/sysvshm.c Sat Dec 30 20:46:47 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvshm.c,v 1.70.2.2.2.1 2006/06/29 09:03:27 tony2001 Exp $ */ +/* $Id: sysvshm.c,v 1.70.2.2.2.2 2006/12/30 20:46:47 iliaa Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -216,7 +216,7 @@ id = Z_LVAL_PP(arg_id); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (!shm_list_ptr) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error_docref(NULL TSRMLS_CC, E_WARNING, The parameter is not a valid shm_identifier); RETURN_FALSE; } @@ -252,7 +252,7 @@ key = Z_LVAL_PP(arg_key); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (type != php_sysvshm.le_shm) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a SysV shared memory index, id); RETURN_FALSE; } @@ -299,7 +299,7 @@ key = Z_LVAL_PP(arg_key); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (type != php_sysvshm.le_shm) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a SysV shared memory index, id); RETURN_FALSE; } @@ -345,7 +345,7 @@ key = Z_LVAL_PP(arg_key); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (type != php_sysvshm.le_shm) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %ld is not a SysV shared memory index, id); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/sysvshm sysvshm.c
iliaa Sat Dec 30 20:50:50 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/sysvshmsysvshm.c Log: MFH: Added missing resource validation checks http://cvs.php.net/viewvc.cgi/php-src/ext/sysvshm/sysvshm.c?r1=1.56.8.6.2.1r2=1.56.8.6.2.2diff_format=u Index: php-src/ext/sysvshm/sysvshm.c diff -u php-src/ext/sysvshm/sysvshm.c:1.56.8.6.2.1 php-src/ext/sysvshm/sysvshm.c:1.56.8.6.2.2 --- php-src/ext/sysvshm/sysvshm.c:1.56.8.6.2.1 Sun Jan 1 13:46:58 2006 +++ php-src/ext/sysvshm/sysvshm.c Sat Dec 30 20:50:50 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvshm.c,v 1.56.8.6.2.1 2006/01/01 13:46:58 sniper Exp $ */ +/* $Id: sysvshm.c,v 1.56.8.6.2.2 2006/12/30 20:50:50 iliaa Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -213,7 +213,7 @@ shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (!shm_list_ptr) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error(E_WARNING, The parameter is not a valid shm_identifier); RETURN_FALSE; } @@ -224,7 +224,7 @@ } RETURN_TRUE; -} +} /* }}} */ /* {{{ proto int shm_put_var(int shm_identifier, int variable_key, mixed variable) @@ -249,7 +249,7 @@ key = Z_LVAL_PP(arg_key); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (type!=php_sysvshm.le_shm) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error(E_WARNING, %ld is not a SysV shared memory index, id); RETURN_FALSE; } @@ -296,7 +296,7 @@ key = Z_LVAL_PP(arg_key); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (type!=php_sysvshm.le_shm) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error(E_WARNING, %ld is not a SysV shared memory index, id); RETURN_FALSE; } @@ -342,7 +342,7 @@ key = Z_LVAL_PP(arg_key); shm_list_ptr = (sysvshm_shm *) zend_list_find(id, type); - if (type!=php_sysvshm.le_shm) { + if (!shm_list_ptr || type != php_sysvshm.le_shm) { php_error(E_WARNING, %ld is not a SysV shared memory index, id); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php