[pywin32-checkins] pywin32/win32/src odbc.cpp,1.8,1.9
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2004-01-20 22:48:21
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1:/tmp/cvs-serv24935 Modified Files: odbc.cpp Log Message: Fix a couple of NULL pointer crashes left in odbc. Index: odbc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** odbc.cpp 18 Oct 2003 06:07:16 -0000 1.8 --- odbc.cpp 20 Jan 2004 22:48:17 -0000 1.9 *************** *** 1245,1248 **** --- 1245,1249 ---- { Py_DECREF(cur->description); + cur->description = NULL; OutOfMemory(); return NULL; *************** *** 1598,1601 **** --- 1599,1606 ---- if (!strcmp(name, "description")) { + if (!cursor(self)->description) { + Py_INCREF(Py_None); + return Py_None; + } Py_INCREF(cursor(self)->description); return cursor(self)->description; |