[pywin32-checkins] pywin32/win32/src win32credmodule.cpp,1.9,1.10
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-02-08 05:17:01
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21238 Modified Files: win32credmodule.cpp Log Message: zero all elts of array so we don't free invalid memory if an error occurs during the fill. Index: win32credmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32credmodule.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** win32credmodule.cpp 8 Dec 2008 13:16:37 -0000 1.9 --- win32credmodule.cpp 8 Feb 2009 05:16:56 -0000 1.10 *************** *** 101,105 **** ret=FALSE; } ! else for (attr_ind=0; attr_ind<*attr_cnt; attr_ind++){ ret=PyWinObject_AsCREDENTIAL_ATTRIBUTE(PyTuple_GET_ITEM(attr_tuple, attr_ind), &(*attrs)[attr_ind]); --- 101,106 ---- ret=FALSE; } ! else { ! memset(*attrs, 0, *attr_cnt * sizeof(CREDENTIAL_ATTRIBUTE)); for (attr_ind=0; attr_ind<*attr_cnt; attr_ind++){ ret=PyWinObject_AsCREDENTIAL_ATTRIBUTE(PyTuple_GET_ITEM(attr_tuple, attr_ind), &(*attrs)[attr_ind]); *************** *** 108,111 **** --- 109,113 ---- } } + } if (!ret) PyWinObject_FreeCREDENTIAL_ATTRIBUTEArray(attrs, *attr_cnt); |