From: Christoph M. Becker Date: Mon, 17 Oct 2016 21:37:00 +0000 (+0200) Subject: Merge branch 'PHP-5.6' into PHP-7.0 X-Git-Tag: php-7.0.13RC1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b596f81b8f151969898c040db41bbb7c64c275a;p=php Merge branch 'PHP-5.6' into PHP-7.0 We also use ZEND_LONG_(MAX|MIN) now instead of LONG_(MAX|MIN). --- 0b596f81b8f151969898c040db41bbb7c64c275a diff --cc NEWS index c9c8543df3,6db7d29a1a..1136fc0370 --- a/NEWS +++ b/NEWS @@@ -17,30 -9,17 +17,33 @@@ PH . Fixed bug #73279 (Integer overflow in gdImageScaleBilinearPalette()). (cmb) . Fixed bug #73280 (Stack Buffer Overflow in GD dynamicGetbuf). (cmb) +- OCI8 + . Fixed bug #71148 (Bind reference overwritten on PHP 7). (Oracle Corp.) + +- phpdbg: + . Properly allow for stdin input from a file. (Bob) + . Add -s command line option / stdin command for reading script from stdin. + (Bob) + . Ignore non-executable opcodes in line mode of phpdbg_end_oplog(). (Bob) + . Fixed bug #70776 (Simple SIGINT does not have any effect with -rr). (Bob) + . Fixed bug #71234 (INI files are loaded even invoked as -n --version). (Bob) + +- Session: + . Fixed bug #73273 (session_unset() empties values from all variables in which + is $_session stored). (Nikita) + - SOAP: . Fixed bug #73037 (SoapServer reports Bad Request when gzipped). (Anatol) + . Fixed bug #73237 (Nested object in "any" element overwrites other fields). + (Keith Smiley) + - SQLite3: + . Fixed bug #73333 (2147483647 is fetched as string). (cmb) + - Standard: . Fixed bug #73203 (passing additional_parameters causes mail to fail). (cmb) - . Fixed bug #73188 (use after free in userspace streams). (Sara) -13 Oct 2016, PHP 5.6.27 +13 Oct 2016 PHP 7.0.12 - Core: . Fixed bug #73025 (Heap Buffer Overflow in virtual_popen of diff --cc ext/sqlite3/sqlite3.c index 9c14dabc66,80d6b897f1..23d0b97b43 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@@ -577,15 -588,24 +577,22 @@@ PHP_METHOD(sqlite3, query } /* }}} */ -static zval* sqlite_value_to_zval(sqlite3_stmt *stmt, int column) /* {{{ */ +static void sqlite_value_to_zval(sqlite3_stmt *stmt, int column, zval *data) /* {{{ */ { - zval *data; + sqlite3_int64 val; + - MAKE_STD_ZVAL(data); switch (sqlite3_column_type(stmt, column)) { case SQLITE_INTEGER: - if ((sqlite3_column_int64(stmt, column)) >= INT_MAX || sqlite3_column_int64(stmt, column) <= INT_MIN) { + val = sqlite3_column_int64(stmt, column); + #if LONG_MAX <= 2147483647 - if (val > LONG_MAX || val < LONG_MIN) { - ZVAL_STRINGL(data, (char *)sqlite3_column_text(stmt, column), sqlite3_column_bytes(stmt, column), 1); ++ if (val > ZEND_LONG_MAX || val < ZEND_LONG_MIN) { + ZVAL_STRINGL(data, (char *)sqlite3_column_text(stmt, column), sqlite3_column_bytes(stmt, column)); } else { - ZVAL_LONG(data, sqlite3_column_int64(stmt, column)); + #endif + ZVAL_LONG(data, val); + #if LONG_MAX <= 2147483647 } + #endif break; case SQLITE_FLOAT: