|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-11-05 03:58 UTC] thies at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 14:00:01 2025 UTC |
This problem has existed since at least 3.0.5 that I'm aware of, and I finally got tired of seeing it.... Any sybase data type that is not explicitly handled (ei. SYBINT(2,4) SYBCHAR, SYBTEXT, SYBREAL) is implicitly converted to SYBCHAR by calling dbconvert, and returns not only the converted data, but un-initialized extranious data for the length the the field as it is stored in sybase. A simple call to memset just before the dbconvert call seems to cure this anoying little creepy crawly... :) This fix may apply to, and close the following bugs (I did little research on these bugid's so YMMV); 863,889,941,894,1112,1338,1376 *** sybase.c.orig Thu Nov 4 13:14:05 1999 --- sybase.c Thu Nov 4 12:39:04 1999 *************** *** 662,667 **** --- 662,668 ---- } res_buf = (char *) emalloc(res_length+1); + memset(res_buf,' ',res_length+1); dbconvert(NULL,coltype(offset),dbdata(sybase_ptr->link,offset), res_length,SYBCHAR,res_buf,-1); /* get rid of trailing spaces */