]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 17 Oct 2016 21:37:00 +0000 (23:37 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 17 Oct 2016 21:38:28 +0000 (23:38 +0200)
We also use ZEND_LONG_(MAX|MIN) now instead of LONG_(MAX|MIN).

1  2 
NEWS
ext/sqlite3/sqlite3.c

diff --cc NEWS
index c9c8543df37a973f524f639fe4923c3780899ef8,6db7d29a1a295cd57fc920ea2394ac9b36f5dbca..1136fc037035a7f7a09737c0f4878469cdc4a1fd
--- 1/NEWS
--- 2/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
index 9c14dabc66367389307894453279290cc704facd,80d6b897f1bc7c6664591ef3b620afedad7730c0..23d0b97b431a316cecf7545393fd6141f795c1db
@@@ -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: