diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-09-28 14:07:23 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-09-28 14:07:23 +0000 |
commit | 183126535c43e7babdad5abd6c7072ed121f10a7 (patch) | |
tree | 0813deadfbf3931f6182358fcf6c5577696d7b52 /ext/mssql/php_mssql.c | |
parent | ab2dead0531ee0b3538475716c2ed3943541e41f (diff) | |
download | php-git-183126535c43e7babdad5abd6c7072ed121f10a7.tar.gz |
Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r-- | ext/mssql/php_mssql.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 9f8dd183b3..c0d20b3845 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -862,6 +862,7 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off res_buf = (unsigned char *) emalloc(res_length+1); res_length = dbconvert(NULL,coltype(offset),dbdata(mssql_ptr->link,offset), res_length, SQLCHAR,res_buf,-1); + res_buf[res_length] = '\0'; } else { if (column_type == SQLDATETIM4) { DBDATETIME temp; @@ -931,7 +932,7 @@ static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int res_buf = (unsigned char *) emalloc(res_length+1); res_length = dbconvert(NULL,coltype(offset),dbdata(mssql_ptr->link,offset), res_length, SQLCHAR, res_buf, -1); - + res_buf[res_length] = '\0'; } else { if (column_type == SQLDATETIM4) { DBDATETIME temp; |