summaryrefslogtreecommitdiff
path: root/ext/sybase/sybase.c
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>1999-11-05 08:48:09 +0000
committerThies C. Arntzen <thies@php.net>1999-11-05 08:48:09 +0000
commitce4f1497341b797126645de5bafa6ebd2dcb5f27 (patch)
tree0e54bdbbfaaecd328a99453824a46154bcb9e5a5 /ext/sybase/sybase.c
parent1890a59cd6ece6980c0e68559342a608ca6c3f53 (diff)
downloadphp-git-ce4f1497341b797126645de5bafa6ebd2dcb5f27.tar.gz
(php3_sybase_get_column_content) initialize buffer before call to dbconvert()
@- Fixed garbage returned at the end of certain Sybase-Columns (Thies) @ Patch submitted by: neal@wanlink.com
Diffstat (limited to 'ext/sybase/sybase.c')
-rw-r--r--ext/sybase/sybase.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/sybase/sybase.c b/ext/sybase/sybase.c
index 95a48562b7..afc0239b53 100644
--- a/ext/sybase/sybase.c
+++ b/ext/sybase/sybase.c
@@ -620,6 +620,9 @@ static void php3_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pv
}
res_buf = (char *) emalloc(res_length+1);
+ memset(res_buf,' ',res_length+1); /* XXX i'm sure there's a better way
+ but i don't have sybase here to test
+ 991105 thies@digicol.de */
dbconvert(NULL,coltype(offset),dbdata(sybase_ptr->link,offset), res_length,SYBCHAR,res_buf,-1);
/* get rid of trailing spaces */