[Informixdb-cvs] informixdb/ext _informixdb.ec,1.74,1.75
Brought to you by:
chaese,
f-apolloner
From: Carsten H. <ch...@us...> - 2006-10-08 01:16:26
|
Update of /cvsroot/informixdb/informixdb/ext In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15861/ext Modified Files: _informixdb.ec Log Message: Use the size of the data buffer when reading out UDT buffer in case we're reading binary data with embedded NULs. Index: _informixdb.ec =================================================================== RCS file: /cvsroot/informixdb/informixdb/ext/_informixdb.ec,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** _informixdb.ec 6 Oct 2006 14:14:12 -0000 1.74 --- _informixdb.ec 8 Oct 2006 01:16:22 -0000 1.75 *************** *** 2203,2208 **** if (ISCOMPLEXTYPE(type)||ISUDTTYPE(type)) { PyObject *result; char *lvcharbuf = ifx_var_getdata(&data); ! result = PyString_FromString(lvcharbuf); ifx_var_dealloc(&data); return result; --- 2203,2209 ---- if (ISCOMPLEXTYPE(type)||ISUDTTYPE(type)) { PyObject *result; + Py_ssize_t len = ifx_var_getlen(&data); char *lvcharbuf = ifx_var_getdata(&data); ! result = PyString_FromStringAndSize(lvcharbuf,len-1); ifx_var_dealloc(&data); return result; |