[pywin32-checkins] pywin32/win32/src/win32net win32netmodule.cpp,1.21,1.22
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2006-02-02 08:25:39
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25789/win32/src/win32net Modified Files: win32netmodule.cpp Log Message: In PyObject_AsNET_STRUCT, check if input security descriptor is NULL before trying to copy it Index: win32netmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** win32netmodule.cpp 29 Aug 2005 09:51:45 -0000 1.21 --- win32netmodule.cpp 2 Feb 2006 08:25:30 -0000 1.22 *************** *** 182,188 **** } PSECURITY_DESCRIPTOR *ppSDdest = ((PSECURITY_DESCRIPTOR *)(buf+pItem->off)); ! size_t len = GetSecurityDescriptorLength(pSDsrc); ! *ppSDdest = (PSECURITY_DESCRIPTOR)malloc(len); ! memcpy(*ppSDdest, pSDsrc, len); } break; --- 182,192 ---- } PSECURITY_DESCRIPTOR *ppSDdest = ((PSECURITY_DESCRIPTOR *)(buf+pItem->off)); ! if (pSDsrc==NULL) ! *ppSDdest=NULL; ! else{ ! size_t len = GetSecurityDescriptorLength(pSDsrc); ! *ppSDdest = (PSECURITY_DESCRIPTOR)malloc(len); ! memcpy(*ppSDdest, pSDsrc, len); ! } } break; |