]> granicus.if.org Git - php/commitdiff
Report len as -1 instead of INT_MAX
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 3 Jun 2020 08:15:54 +0000 (10:15 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 8 Jul 2020 08:38:11 +0000 (10:38 +0200)
Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.

(cherry picked from commit 39111585a2f8e40e72bdc662eb8b2e3c19e93615)

ext/pdo_sqlite/sqlite_statement.c
ext/pdo_sqlite/tests/bug79664.phpt

index 5aae9a073b73dc26b355ac4d5dc6969a8cdd5e5f..2ef6c2ab836461415492cfd52b6c1b60243f373b 100644 (file)
@@ -282,7 +282,7 @@ static int pdo_sqlite_stmt_describe(pdo_stmt_t *stmt, int colno)
 
        str = sqlite3_column_name(S->stmt, colno);
        stmt->columns[colno].name = zend_string_init(str, strlen(str), 0);
-       stmt->columns[colno].maxlen = 0xffffffff;
+       stmt->columns[colno].maxlen = SIZE_MAX;
        stmt->columns[colno].precision = 0;
 
        switch (sqlite3_column_type(S->stmt, colno)) {
index 072d107ba6ae7c987ffcd25ea5067dc8079edc68..fae39aea3effba60573e28dc7cc82a75706d1147 100644 (file)
@@ -24,7 +24,7 @@ array(6) {
   ["name"]=>
   string(1) "1"
   ["len"]=>
-  int(4294967295)
+  int(-1)
   ["precision"]=>
   int(0)
   ["pdo_type"]=>