php-src/ext/odbc
Christoph M. Becker 16db4d1462 Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
The SQL Server Native Client 11.0 and maybe other ODBC drivers report
NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0. This causes too small a
buffer to be emalloc'd, likely causing a segfault in the following. As we don't
know the real size of the column data, we treat such colums as
SQL_WLONGVARCHAR.

The related bug #67437 suggests that some drivers report a size of ~4GB. It is
not certain that this is really the case (there might be some integer overflow
involved, and anyway, there has been no feedback), so we do not cater for this
now. However, it would not be hard to treat all sizes above a certain threshold
in a similar way, i.e. as SQL_WLONGVARCHAR.
2015-07-03 00:15:47 +02:00
..
tests Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns 2015-07-03 00:15:47 +02:00
birdstep.c Bump year 2015-01-15 23:26:03 +08:00
config.m4 revert a4157423934edf7b8fdbcee163cced9bfd5748a, fix build odbc as shared 2015-03-25 10:33:08 +01:00
config.w32 fix setting default ODBCVER value in config.w32 2015-02-06 19:59:14 +01:00
CREDITS
php_birdstep.h Bump year 2015-01-15 23:26:03 +08:00
php_odbc_includes.h fix column name attribute with ODBC 3.0 2015-04-17 17:10:46 +02:00
php_odbc.c Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns 2015-07-03 00:15:47 +02:00
php_odbc.h Fixed bug #68964 Allowed memory size exhausted with odbc_exec 2015-02-06 19:00:27 +01:00