diff options
| author | Keyur Govande <keyur@php.net> | 2014-07-28 23:15:23 +0000 |
|---|---|---|
| committer | Keyur Govande <keyur@php.net> | 2014-07-28 23:15:23 +0000 |
| commit | 00546bc9b7cb8208c27de9c6ebd12156401a5607 (patch) | |
| tree | 39956a5dfd4b05c9e77b0f719ca72c102705bb1f /ext/odbc/php_odbc_includes.h | |
| parent | 3e167ba990afc1f46739dfed9d4ba42e9389b2f2 (diff) | |
| download | php-git-00546bc9b7cb8208c27de9c6ebd12156401a5607.tar.gz | |
Fix bug #60616 (odbc_fetch_into returns junk at end of multi-byte char fields)
The ODBC extension did not support WVARCHAR. WVARCHAR ends up being handled by
the default handler where vallen is set by the driver to the actual bytes
needed for the field. If it is larger than default-lrl then the output is
corrupted (reading past the buffer) because the return functions don't expect
that to happen. The patch add support to handle WVARCHAR just like a regular
VARCHAR.
Diffstat (limited to 'ext/odbc/php_odbc_includes.h')
| -rw-r--r-- | ext/odbc/php_odbc_includes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index a9b0acfa0c..b3ae889974 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -284,7 +284,7 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC); void odbc_sql_error(ODBC_SQL_ERROR_PARAMS); -#define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR) +#define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR || x == SQL_WVARCHAR || x == SQL_WLONGVARCHAR) #define IS_SQL_BINARY(x) (x == SQL_BINARY || x == SQL_VARBINARY || x == SQL_LONGVARBINARY) #ifdef ZTS |
