Skip to content

Commit e6160e9

Browse files
nikiccmb69
authored andcommitted
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 3911158)
1 parent e54f18a commit e6160e9

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
@@ -282,7 +282,7 @@ static int pdo_sqlite_stmt_describe(pdo_stmt_t *stmt, int colno)
282282

283283
str = sqlite3_column_name(S->stmt, colno);
284284
stmt->columns[colno].name = zend_string_init(str, strlen(str), 0);
285-
stmt->columns[colno].maxlen = 0xffffffff;
285+
stmt->columns[colno].maxlen = SIZE_MAX;
286286
stmt->columns[colno].precision = 0;
287287

288288
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)