summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-03 10:15:54 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-07-08 10:38:11 +0200
commite6160e99d8525c30420a9c8418e798d3e33f26a3 (patch)
tree67f442459b2cad8ace99d475480e237e2546f64b
parente54f18ae0f44df07d5587d5e225b97d6f962a283 (diff)
downloadphp-git-e6160e99d8525c30420a9c8418e798d3e33f26a3.tar.gz
Report len as -1 instead of INT_MAX
Per docs it should be -1. And would be on 32-bit systems, but not on 64-bit systems. (cherry picked from commit 39111585a2f8e40e72bdc662eb8b2e3c19e93615)
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c2
-rw-r--r--ext/pdo_sqlite/tests/bug79664.phpt2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index 5aae9a073b..2ef6c2ab83 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -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)) {
diff --git a/ext/pdo_sqlite/tests/bug79664.phpt b/ext/pdo_sqlite/tests/bug79664.phpt
index 072d107ba6..fae39aea3e 100644
--- a/ext/pdo_sqlite/tests/bug79664.phpt
+++ b/ext/pdo_sqlite/tests/bug79664.phpt
@@ -24,7 +24,7 @@ array(6) {
["name"]=>
string(1) "1"
["len"]=>
- int(4294967295)
+ int(-1)
["precision"]=>
int(0)
["pdo_type"]=>