Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h
Hi! >> Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f >> Author:Nuno Lopes Mon, 2 Jul 2012 01:31:40 >> -0400 >> Parents: be4053cea0462c9de5396641f4e4fa2f56f5a675 >> Branches: PHP-5.4 >> >> Link: >> http://git.php.net/?p=php-src.git;a=commitdiff;h=91ce8041a3e85594e81466a528f8d55cdc164c1f >> >> Log: >> fix (signed) integer overflow (part of bug #52550 BTW, this generates huge amount of "unary minus applied to unsigned" warnings on Windows, may be a good idea to fix that. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h
Hi! Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f Author:Nuno Lopes Mon, 2 Jul 2012 01:31:40 -0400 Parents: be4053cea0462c9de5396641f4e4fa2f56f5a675 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=91ce8041a3e85594e81466a528f8d55cdc164c1f Log: fix (signed) integer overflow (part of bug #52550 BTW, this generates huge amount of "unary minus applied to unsigned" warnings on Windows, may be a good idea to fix that. Ok. I don 't have a MSVC setup handy. Can you please test if replacing that line with 'idx = 0 - idx;' fixes the warnings for you? Thanks, Nuno -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] tag php-src: create tag php-5.3.15RC1
Tag php-5.3.15RC1 in php-src.git was created Tag: 993575f6453be169bdea6375eabe8a42d5661415 Tagger: Johannes Schlüter Thu Jul 5 01:05:52 2012 +0200 Log: PHP 5.3.15RC1 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (SunOS) iQEcBAABAgAGBQJP9MxgAAoJEH3sTmn8nIPXY/MH/j0Uo87VIyZFpOMU6UlxadR3 8vFTSWOg4SsgdI9zFuTHcmW+cbYvoxCqFNXcIO0jwnEcMvM/fvcnOOpf7sYDW5cL U2MsYNoE931UQaD32U4U0Vx6u8wHneXMCh/ePC7Hrr7gJNhV9b+Lnfeo2FbFEvw+ Sj/WKAZRiQ99hyH1PubO9qWYIGlgbHuWWZ+q9OvDtW3VigJrBc3hsZ9WhmEE8xEB RQsNYI0AE8QKVjE75srt9ZC+To3DI+mL3ibJo02oI+/mPTCiCBEwz+M5qAUNKsQq 7FGV5u9OIqTm8H9MeFIScWK3VpqmflbEDdNTuiwHtoxTFh3/Yx1mCsaB+tfK/Hg= =gEvZ -END PGP SIGNATURE- Link: http://git.php.net/?p=php-src.git;a=tag;h=993575f6453be169bdea6375eabe8a42d5661415 Target: 1f6c43f0555038056c123945e6600c3a18ac2407 Author: johannes Thu, 5 Jul 2012 01:00:23 +0200 Parents: bcc87ba68ede7b90cd544ec0911bdbe5d844aa2a Target link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1f6c43f0555038056c123945e6600c3a18ac2407 Target log: PHP 5.3.15RC1 Changed paths: M NEWS M configure.in M main/php_version.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: This wil be PHP 5.3.16: NEWS configure.in main/php_version.h
Commit:6b2b1952671c74056c3335ded8342a94d5df931f Author:Johannes Schlüter Thu, 5 Jul 2012 01:15:27 +0200 Parents: bcc87ba68ede7b90cd544ec0911bdbe5d844aa2a Branches: PHP-5.3 PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6b2b1952671c74056c3335ded8342a94d5df931f Log: This wil be PHP 5.3.16 Changed paths: M NEWS M configure.in M main/php_version.h Diff: diff --git a/NEWS b/NEWS index c650c85..782bb62 100644 --- a/NEWS +++ b/NEWS @@ -1,69 +1,10 @@ PHPNEWS ||| -?? ??? 2012, PHP 5.3.15 -- Zend Engine: - . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that -includes a semi-colon). (Pierrick) - -- COM: - . Fixed bug #62146 com_dotnet cannot be built shared. (Johannes) - -- Core: - . Fixed potential overflow in _php_stream_scandir. (Jason Powell, -Stas) - . Fixed bug #62432 (ReflectionMethod random corrupt memory on high -concurrent). (Johannes) - . Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed -Salt). (Anthony Ferrara) - -- Fileinfo: - . Fixed magic file regex support. (Felipe) - -- FPM: - . Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat) - . Fixed bug #61835 (php-fpm is not allowed to run as root). (fat) - . Fixed bug #61295 (php-fpm should not fail with commented 'user' -for non-root start). (fat) - . Fixed bug #61026 (FPM pools can listen on the same address). (fat) - . Fixed bug #62033 (php-fpm exits with status 0 on some failures to start). -(fat) - . Fixed bug #62153 (when using unix sockets, multiples FPM instances -can be launched without errors). (fat) - . Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat) - . Fixed bug #61218 (FPM drops connection while receiving some binary values -in FastCGI requests). (fat) - . Fixed bug #62205 (php-fpm segfaults (null passed to strstr)). (fat) +?? ??? 2012, PHP 5.3.16 -- Intl: - . Fixed bug #62083 (grapheme_extract() memory leaks). (Gustavo) - . Fixed bug #62081 (IntlDateFormatter constructor leaks memory when called -twice). (Gustavo) - . Fixed bug #62070 (Collator::getSortKey() returns garbage). (Gustavo) - . Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks -pattern). (Gustavo) - . Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo) - -- JSON: - . Improved error handling. (Nikita Popov) - -- Phar: - . Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe) - -- Reflection: - . Fixed bug #62384 (Attempting to invoke a Closure more than once causes -segfault). (Felipe) - . Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks -with constant). (Laruence) - -- SPL: - . Fixed bug #62262 (RecursiveArrayIterator does not implement Countable). -(Nikita Popov) - -- XML Writer: - . Fixed bug #62064 (memory leak in the XML Writer module). -(jean-pierre dot lozi at lip6 dot fr) -- Zip: - . Upgraded libzip to 0.10.1 (Anatoliy) +?? ??? 2012, PHP 5.3.15 + (NEWS will be merged after release by johannes. Formerging changes to the + PHP-5.3.15 release branch talk to johannes) 14 Jun 2012, PHP 5.3.14 diff --git a/configure.in b/configure.in index 6d24249..fa6c557 100644 --- a/configure.in +++ b/configure.in @@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h) PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 -PHP_RELEASE_VERSION=15 +PHP_RELEASE_VERSION=16 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index 2f65dbd..3107a28 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 15 +#define PHP_RELEASE_VERSION 16 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "5.3.15-dev" -#define PHP_VERSION_ID 50315 +#define PHP_VERSION "5.3.16-dev" +#define PHP_VERSION_ID 50316 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially not if they aren't in 5.4, too.: ext/json/json.c ext/json/php_json.h ext/json/tests/bug43941.phpt ex
Commit:bcc87ba68ede7b90cd544ec0911bdbe5d844aa2a Author:johannes Thu, 5 Jul 2012 00:55:47 +0200 Parents: d80ff391899f7aead3b9b9c6c084adba8a8203ba Branches: PHP-5.3 PHP-5.4 master PHP-5.3.15 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bcc87ba68ede7b90cd544ec0911bdbe5d844aa2a Log: Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially not if they aren't in 5.4, too. Changed paths: M ext/json/json.c M ext/json/php_json.h A ext/json/tests/bug43941.phpt M ext/json/tests/bug54058.phpt D ext/json/tests/bug61537.phpt Diff: diff --git a/ext/json/json.c b/ext/json/json.c index ce2cf43..5b62c2f 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -73,7 +73,6 @@ static PHP_MINIT_FUNCTION(json) REGISTER_LONG_CONSTANT("JSON_HEX_QUOT", PHP_JSON_HEX_QUOT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("JSON_PARTIAL_OUTPUT_ON_ERROR", PHP_JSON_PARTIAL_OUTPUT_ON_ERROR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, CONST_CS | CONST_PERSISTENT); @@ -321,7 +320,9 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR } if (len < 0) { JSON_G(error_code) = PHP_JSON_ERROR_UTF8; - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid UTF-8 sequence in argument"); + if (!PG(display_errors)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid UTF-8 sequence in argument"); + } smart_str_appendl(buf, "null", 4); } else { smart_str_appendl(buf, "\"\"", 2); @@ -570,11 +571,7 @@ static PHP_FUNCTION(json_encode) php_json_encode(&buf, parameter, options TSRMLS_CC); - if (JSON_G(error_code) != PHP_JSON_ERROR_NONE && options ^ PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) { - ZVAL_FALSE(return_value); - } else { - ZVAL_STRINGL(return_value, buf.c, buf.len, 1); - } + ZVAL_STRINGL(return_value, buf.c, buf.len, 1); smart_str_free(&buf); } diff --git a/ext/json/php_json.h b/ext/json/php_json.h index 3cb4902..b104d4c 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -56,7 +56,6 @@ PHP_JSON_API void php_json_decode(zval *return_value, char *str, int str_len, ze #define PHP_JSON_HEX_QUOT (1<<3) #define PHP_JSON_FORCE_OBJECT (1<<4) #define PHP_JSON_NUMERIC_CHECK (1<<5) -#define PHP_JSON_PARTIAL_OUTPUT_ON_ERROR (1<<9) #define PHP_JSON_OUTPUT_ARRAY 0 #define PHP_JSON_OUTPUT_OBJECT 1 diff --git a/ext/json/tests/bug43941.phpt b/ext/json/tests/bug43941.phpt new file mode 100644 index 000..0f86d1d --- /dev/null +++ b/ext/json/tests/bug43941.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #43941 (json_encode() invalid UTF-8) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +string(5) ""abc"" +string(4) "null" +string(4) "null" +string(17) "[null,null,"abc"]" +Done + diff --git a/ext/json/tests/bug54058.phpt b/ext/json/tests/bug54058.phpt index 08c7f57..3b1136b 100644 --- a/ext/json/tests/bug54058.phpt +++ b/ext/json/tests/bug54058.phpt @@ -29,14 +29,7 @@ json_encode($c); var_dump(json_last_error()); ?> --EXPECTF-- -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d int(5) - -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d int(5) - -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d int(5) - -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d int(5) diff --git a/ext/json/tests/bug61537.phpt b/ext/json/tests/bug61537.phpt deleted file mode 100644 index e2abdda..000 --- a/ext/json/tests/bug61537.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Bug #61537 (json_encode() incorrectly truncates/discards information) ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d -bool(false) -int(5) - -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d -string(4) "null" -int(5) - -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d -bool(false) -int(5) - -Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d -string(4) "null" -int(5) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: PHP 5.3.15RC1: NEWS configure.in main/php_version.h
Commit:1f6c43f0555038056c123945e6600c3a18ac2407 Author:johannes Thu, 5 Jul 2012 01:00:23 +0200 Parents: bcc87ba68ede7b90cd544ec0911bdbe5d844aa2a Branches: PHP-5.3.15 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1f6c43f0555038056c123945e6600c3a18ac2407 Log: PHP 5.3.15RC1 Changed paths: M NEWS M configure.in M main/php_version.h Diff: diff --git a/NEWS b/NEWS index c650c85..1f64cc0 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ PHPNEWS ||| -?? ??? 2012, PHP 5.3.15 +05 Jul 2012, PHP 5.3.15RC1 - Zend Engine: . Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon). (Pierrick) @@ -62,6 +62,7 @@ PHP NEWS - XML Writer: . Fixed bug #62064 (memory leak in the XML Writer module). (jean-pierre dot lozi at lip6 dot fr) + - Zip: . Upgraded libzip to 0.10.1 (Anatoliy) diff --git a/configure.in b/configure.in index 6d24249..c98260d 100644 --- a/configure.in +++ b/configure.in @@ -42,7 +42,7 @@ AC_CONFIG_HEADER(main/php_config.h) PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=15 -PHP_EXTRA_VERSION="-dev" +PHP_EXTRA_VERSION="RC1" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/main/php_version.h b/main/php_version.h index 2f65dbd..103caba 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 15 -#define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "5.3.15-dev" +#define PHP_EXTRA_VERSION "RC1" +#define PHP_VERSION "5.3.15RC1" #define PHP_VERSION_ID 50315 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php