diff options
author | Felipe Pena <felipensp@gmail.com> | 2013-06-24 14:43:35 -0300 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2013-06-24 14:43:35 -0300 |
commit | 8776555d7a4fa510e79a986799921b4248c628c0 (patch) | |
tree | b3f22a22fab1718ae13639acb42b9357bf5501e1 /ext/odbc | |
parent | 9cf3e65391d6aa637e5471449499e957cff6ee89 (diff) | |
download | php-git-8776555d7a4fa510e79a986799921b4248c628c0.tar.gz |
- Fixed bug #61387 (NULL valued anonymous column causes segfault in odbc_fetch_array) patch by: Brandon Kirsch
Diffstat (limited to 'ext/odbc')
-rw-r--r-- | ext/odbc/php_odbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index adb7272d42..1e7166a5ec 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1765,7 +1765,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) if (result_type & ODBC_NUM) { zend_hash_index_update(Z_ARRVAL_P(return_value), i, &tmp, sizeof(zval *), NULL); } else { - if (!*(result->values[i].name)) { + if (!*(result->values[i].name) && Z_TYPE_P(tmp) == IS_STRING) { zend_hash_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)+1, &tmp, sizeof(zval *), NULL); } else { zend_hash_update(Z_ARRVAL_P(return_value), result->values[i].name, strlen(result->values[i].name)+1, &tmp, sizeof(zval *), NULL); |