summaryrefslogtreecommitdiff
path: root/ext/odbc/php_odbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/odbc/php_odbc.c')
-rw-r--r--ext/odbc/php_odbc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 8dc9c75844..bfb72bcff7 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1870,6 +1870,7 @@ PHP_FUNCTION(odbc_result)
if (rc != SQL_SUCCESS_WITH_INFO) {
field_str = zend_string_truncate(field_str, result->values[field_ind].vallen, 0);
}
+ ZSTR_VAL(field_str)[ZSTR_LEN(field_str)] = '\0';
RETURN_NEW_STR(field_str);
break;