[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/DateInterval_format.phpt branches/PHP_5_3/ext/date/tests/bug48187.phpt branches/PHP_5_3/ext/date/tests/bug51819.phpt trunk/ext/date/tests/D
philip Thu, 12 May 2011 06:51:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310963 Log: Added missing date_default_timezone_set('UTC'); to the appropriate tests. A few now pass by not showing the timezone warning. Changed paths: U php/php-src/branches/PHP_5_3/ext/date/tests/DateInterval_format.phpt U php/php-src/branches/PHP_5_3/ext/date/tests/bug48187.phpt U php/php-src/branches/PHP_5_3/ext/date/tests/bug51819.phpt U php/php-src/trunk/ext/date/tests/DateInterval_format.phpt U php/php-src/trunk/ext/date/tests/bug48187.phpt U php/php-src/trunk/ext/date/tests/bug51819.phpt U php/php-src/trunk/ext/date/tests/bug51866.phpt Modified: php/php-src/branches/PHP_5_3/ext/date/tests/DateInterval_format.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/DateInterval_format.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/branches/PHP_5_3/ext/date/tests/DateInterval_format.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -10,6 +10,7 @@ ?php if (!method_exists('DateInterval', 'format')) die(skip: method doesn't exist); ? --FILE-- ?php +date_default_timezone_set('UTC'); $date1 = new DateTime('2000-01-01 00:00:00'); $date2 = new DateTime('2001-03-04 04:05:06'); Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug48187.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug48187.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug48187.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -2,6 +2,8 @@ Bug #48187 (DateTime::diff() corrupting microtime() result) --FILE-- ?php +date_default_timezone_set('UTC'); + // two arbitrary dates $date1 = new DateTime('2005-07-23'); $date2 = new DateTime('2006-02-14'); Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug51819.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug51819.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug51819.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -2,6 +2,8 @@ Bug #51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error) --FILE-- ?php +date_default_timezone_set('UTC'); + $aTzAbbr = timezone_abbreviations_list(); $aTz = array(); Modified: php/php-src/trunk/ext/date/tests/DateInterval_format.phpt === --- php/php-src/trunk/ext/date/tests/DateInterval_format.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/trunk/ext/date/tests/DateInterval_format.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -10,6 +10,7 @@ ?php if (!method_exists('DateInterval', 'format')) die(skip: method doesn't exist); ? --FILE-- ?php +date_default_timezone_set('UTC'); $date1 = new DateTime('2000-01-01 00:00:00'); $date2 = new DateTime('2001-03-04 04:05:06'); Modified: php/php-src/trunk/ext/date/tests/bug48187.phpt === --- php/php-src/trunk/ext/date/tests/bug48187.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/trunk/ext/date/tests/bug48187.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -2,6 +2,8 @@ Bug #48187 (DateTime::diff() corrupting microtime() result) --FILE-- ?php +date_default_timezone_set('UTC'); + // two arbitrary dates $date1 = new DateTime('2005-07-23'); $date2 = new DateTime('2006-02-14'); Modified: php/php-src/trunk/ext/date/tests/bug51819.phpt === --- php/php-src/trunk/ext/date/tests/bug51819.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/trunk/ext/date/tests/bug51819.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -2,6 +2,8 @@ Bug #51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error) --FILE-- ?php +date_default_timezone_set('UTC'); + $aTzAbbr = timezone_abbreviations_list(); $aTz = array(); Modified: php/php-src/trunk/ext/date/tests/bug51866.phpt === --- php/php-src/trunk/ext/date/tests/bug51866.phpt 2011-05-12 01:43:59 UTC (rev 310962) +++ php/php-src/trunk/ext/date/tests/bug51866.phpt 2011-05-12 06:51:46 UTC (rev 310963) @@ -2,6 +2,8 @@ Bug #51866 (Lenient parsing with parseFromFormat) --FILE-- ?php +date_default_timezone_set('UTC'); + $tests = array( array( 'Y-m-d', '2001-11-29 13:20:01' ), array( 'Y-m-d+', '2001-11-29 13:20:01' ), -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/gd/config.m4 trunk/ext/gd/config.m4
rasmus Thu, 12 May 2011 08:19:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310964 Log: Check headers first and let the CHECK_LIBRARY macro handle checking for the library. This makes it correctly handle non-standard system paths as long as gcc knows about them. Should fix the build on Ubuntu natty. Changed paths: U php/php-src/branches/PHP_5_3/ext/gd/config.m4 U php/php-src/trunk/ext/gd/config.m4 Modified: php/php-src/branches/PHP_5_3/ext/gd/config.m4 === --- php/php-src/branches/PHP_5_3/ext/gd/config.m4 2011-05-12 06:51:46 UTC (rev 310963) +++ php/php-src/branches/PHP_5_3/ext/gd/config.m4 2011-05-12 08:19:37 UTC (rev 310964) @@ -72,11 +72,11 @@ if test $PHP_JPEG_DIR != no; then for i in $PHP_JPEG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libjpeg.a GD_JPEG_DIR=$i break + test -f $i/include/jpeglib.h GD_JPEG_DIR=$i break done if test -z $GD_JPEG_DIR; then - AC_MSG_ERROR([libjpeg.(a|so) not found.]) + AC_MSG_ERROR([jpeglib.h not found.]) fi PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, @@ -97,21 +97,17 @@ if test $PHP_PNG_DIR != no; then for i in $PHP_PNG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libpng.a GD_PNG_DIR=$i break + test -f $i/include/png.h GD_PNG_DIR=$i break done if test -z $GD_PNG_DIR; then - AC_MSG_ERROR([libpng.(a|so) not found.]) + AC_MSG_ERROR([png.h not found.]) fi if test $PHP_ZLIB_DIR = no; then AC_MSG_ERROR([PNG support requires ZLIB. Use --with-zlib-dir=DIR]) fi -if test ! -f $GD_PNG_DIR/include/png.h; then - AC_MSG_ERROR([png.h not found.]) -fi - PHP_CHECK_LIBRARY(png,png_write_image, [ PHP_ADD_INCLUDE($GD_PNG_DIR/include) Modified: php/php-src/trunk/ext/gd/config.m4 === --- php/php-src/trunk/ext/gd/config.m4 2011-05-12 06:51:46 UTC (rev 310963) +++ php/php-src/trunk/ext/gd/config.m4 2011-05-12 08:19:37 UTC (rev 310964) @@ -77,11 +77,11 @@ if test $PHP_VPX_DIR != no; then for i in $PHP_VPX_DIR /usr/local /usr; do - test -f $i/$PHP_VPX_DIR/libvpx.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libvpx.a GD_VPX_DIR=$i break + test -f $i/include/vpx_codec.h || test -f $i/include/vpx/vpx_codec.h GD_VPX_DIR=$i break done if test -z $GD_VPX_DIR; then - AC_MSG_ERROR([libvpx.(a|so) not found.]) + AC_MSG_ERROR([vpx_codec.h not found.]) fi PHP_CHECK_LIBRARY(vpx,vpx_codec_destroy, @@ -103,11 +103,11 @@ if test $PHP_JPEG_DIR != no; then for i in $PHP_JPEG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libjpeg.a GD_JPEG_DIR=$i break + test -f $i/include/jpeglib.h GD_JPEG_DIR=$i break done if test -z $GD_JPEG_DIR; then - AC_MSG_ERROR([libjpeg.(a|so) not found.]) + AC_MSG_ERROR([jpeglib.h not found.]) fi PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, @@ -128,21 +128,17 @@ if test $PHP_PNG_DIR != no; then for i in $PHP_PNG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libpng.a GD_PNG_DIR=$i break + test -f $i/include/png.h GD_PNG_DIR=$i break done if test -z $GD_PNG_DIR; then - AC_MSG_ERROR([libpng.(a|so) not found.]) + AC_MSG_ERROR([png.h not found.]) fi if test $PHP_ZLIB_DIR = no; then AC_MSG_ERROR([PNG support requires ZLIB. Use --with-zlib-dir=DIR]) fi -if test ! -f $GD_PNG_DIR/include/png.h; then - AC_MSG_ERROR([png.h not found.]) -fi - PHP_CHECK_LIBRARY(png,png_write_image, [ PHP_ADD_INCLUDE($GD_PNG_DIR/include) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/image.c trunk/ext/standard/image.c
scottmac Fri, 13 May 2011 05:06:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310980 Log: Fixed bug #54723 - getimagesize() doesn't check the full ico signature and misreports mpg files Bug: http://bugs.php.net/54723 (Open) getimagesize() incorrectly identifies files as ICO which aren't Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/image.c U php/php-src/trunk/ext/standard/image.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-05-13 03:50:23 UTC (rev 310979) +++ php/php-src/branches/PHP_5_3/NEWS 2011-05-13 05:06:48 UTC (rev 310980) @@ -19,6 +19,8 @@ . Implemented FR #54459 (Range function accuracy). (Adam) . Added PHP_MANDIR constant telling where the manpages were installed into, and an --man-dir argument to php-config. (Hannes) + . Fixed bug #54723 (getimagesize() doesn't check the full ico signature). +(Scott) . Fixed bug #54580 (get_browser() segmentation fault when browscap ini directive is set through php_admin_value). (Gustavo) . Fixed bug #54238 (use-after-free in substr_replace()). (Stas) Modified: php/php-src/branches/PHP_5_3/ext/standard/image.c === --- php/php-src/branches/PHP_5_3/ext/standard/image.c 2011-05-13 03:50:23 UTC (rev 310979) +++ php/php-src/branches/PHP_5_3/ext/standard/image.c 2011-05-13 05:06:48 UTC (rev 310980) @@ -51,7 +51,7 @@ (char)0x6a, (char)0x50, (char)0x20, (char)0x20, (char)0x0d, (char)0x0a, (char)0x87, (char)0x0a}; PHPAPI const char php_sig_iff[4] = {'F','O','R','M'}; -PHPAPI const char php_sig_ico[3] = {(char)0x00, (char)0x00, (char)0x01}; +PHPAPI const char php_sig_ico[4] = {(char)0x00, (char)0x00, (char)0x01, (char)0x00}; /* REMEMBER TO ADD MIME-TYPE TO FUNCTION php_image_type_to_mime_type */ /* PCX must check first 64bytes and byte 0=0x0a and byte2 0x06 */ @@ -1265,7 +1265,7 @@ return IMAGE_FILETYPE_TIFF_MM; } else if (!memcmp(filetype, php_sig_iff, 4)) { return IMAGE_FILETYPE_IFF; - } else if (!memcmp(filetype, php_sig_ico, 3)) { + } else if (!memcmp(filetype, php_sig_ico, 4)) { return IMAGE_FILETYPE_ICO; } Modified: php/php-src/trunk/ext/standard/image.c === --- php/php-src/trunk/ext/standard/image.c 2011-05-13 03:50:23 UTC (rev 310979) +++ php/php-src/trunk/ext/standard/image.c 2011-05-13 05:06:48 UTC (rev 310980) @@ -51,7 +51,7 @@ (char)0x6a, (char)0x50, (char)0x20, (char)0x20, (char)0x0d, (char)0x0a, (char)0x87, (char)0x0a}; PHPAPI const char php_sig_iff[4] = {'F','O','R','M'}; -PHPAPI const char php_sig_ico[3] = {(char)0x00, (char)0x00, (char)0x01}; +PHPAPI const char php_sig_ico[4] = {(char)0x00, (char)0x00, (char)0x01, (char)0x00}; /* REMEMBER TO ADD MIME-TYPE TO FUNCTION php_image_type_to_mime_type */ /* PCX must check first 64bytes and byte 0=0x0a and byte2 0x06 */ @@ -1265,7 +1265,7 @@ return IMAGE_FILETYPE_TIFF_MM; } else if (!memcmp(filetype, php_sig_iff, 4)) { return IMAGE_FILETYPE_IFF; - } else if (!memcmp(filetype, php_sig_ico, 3)) { + } else if (!memcmp(filetype, php_sig_ico, 4)) { return IMAGE_FILETYPE_ICO; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/xmlreader/php_xmlreader.c trunk/ext/xmlreader/php_xmlreader.c
scottmac Fri, 13 May 2011 05:54:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310981 Log: Fix use after free() in XMLReader::xml() Changed paths: U php/php-src/branches/PHP_5_3/ext/xmlreader/php_xmlreader.c U php/php-src/trunk/ext/xmlreader/php_xmlreader.c Modified: php/php-src/branches/PHP_5_3/ext/xmlreader/php_xmlreader.c === --- php/php-src/branches/PHP_5_3/ext/xmlreader/php_xmlreader.c 2011-05-13 05:06:48 UTC (rev 310980) +++ php/php-src/branches/PHP_5_3/ext/xmlreader/php_xmlreader.c 2011-05-13 05:54:34 UTC (rev 310981) @@ -1092,9 +1092,7 @@ uri = (char *) xmlCanonicPath((const xmlChar *) resolved_path); } reader = xmlNewTextReader(inputbfr, uri); - if (uri) { - xmlFree(uri); - } + if (reader != NULL) { #if LIBXML_VERSION = 20628 ret = xmlTextReaderSetup(reader, NULL, uri, encoding, options); @@ -1108,11 +1106,20 @@ } intern-input = inputbfr; intern-ptr = reader; + + if (uri) { + xmlFree(uri); + } + return; } } } + if (uri) { + xmlFree(uri); + } + if (inputbfr) { xmlFreeParserInputBuffer(inputbfr); } Modified: php/php-src/trunk/ext/xmlreader/php_xmlreader.c === --- php/php-src/trunk/ext/xmlreader/php_xmlreader.c 2011-05-13 05:06:48 UTC (rev 310980) +++ php/php-src/trunk/ext/xmlreader/php_xmlreader.c 2011-05-13 05:54:34 UTC (rev 310981) @@ -30,6 +30,7 @@ #ifdef HAVE_DOM #include ext/dom/xml_common.h #endif +#include libxml/xmlreader.h #include libxml/uri.h zend_class_entry *xmlreader_class_entry; @@ -1091,9 +1092,7 @@ uri = (char *) xmlCanonicPath((const xmlChar *) resolved_path); } reader = xmlNewTextReader(inputbfr, uri); - if (uri) { - xmlFree(uri); - } + if (reader != NULL) { #if LIBXML_VERSION = 20628 ret = xmlTextReaderSetup(reader, NULL, uri, encoding, options); @@ -1107,11 +1106,20 @@ } intern-input = inputbfr; intern-ptr = reader; + + if (uri) { + xmlFree(uri); + } + return; } } } + if (uri) { + xmlFree(uri); + } + if (inputbfr) { xmlFreeParserInputBuffer(inputbfr); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php