Skip to content

Commit 3911158

Browse files
committed
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.
1 parent 2a7d628 commit 3911158

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/pdo_sqlite/sqlite_statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static int pdo_sqlite_stmt_describe(pdo_stmt_t *stmt, int colno)
286286

287287
str = sqlite3_column_name(S->stmt, colno);
288288
stmt->columns[colno].name = zend_string_init(str, strlen(str), 0);
289-
stmt->columns[colno].maxlen = 0xffffffff;
289+
stmt->columns[colno].maxlen = SIZE_MAX;
290290
stmt->columns[colno].precision = 0;
291291

292292
switch (sqlite3_column_type(S->stmt, colno)) {

ext/pdo_sqlite/tests/bug79664.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ array(6) {
2424
["name"]=>
2525
string(1) "1"
2626
["len"]=>
27-
int(4294967295)
27+
int(-1)
2828
["precision"]=>
2929
int(0)
3030
["pdo_type"]=>

0 commit comments

Comments
 (0)