mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Limit the size of columns to 64K, so we don't try to allocate 2GB for each text
column coming out of informix. Refs Bug #33533. Not totally closed yet; still need to cater for text fields longer than 64k in a sane manner.
This commit is contained in:
parent
96a273a10d
commit
e568ea3277
@ -386,6 +386,12 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* enforce a practical limitation.
|
||||
* TODO: make this work more nicely */
|
||||
if (colsize > 65535) {
|
||||
colsize = 65535;
|
||||
}
|
||||
|
||||
col->maxlen = S->cols[colno].datalen = colsize;
|
||||
col->namelen = colnamelen;
|
||||
col->name = estrdup(S->cols[colno].colname);
|
||||
|
Loading…
Reference in New Issue
Block a user