[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.136

Matthew T. Kromer matt at zope.com
Wed Aug 27 12:51:31 EDT 2003


Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv8571/src

Modified Files:
	dco2.c 
Log Message:
Mihai Ibanescu points out that if you do a cursor.prepare() followed by a 
cursor.describe(), you segfault.  This is not a normal code path, but segfaults
are still bad.


=== Products/DCOracle2/src/dco2.c 1.135 => 1.136 ===
--- Products/DCOracle2/src/dco2.c:1.135	Wed Aug 27 10:40:02 2003
+++ Products/DCOracle2/src/dco2.c	Wed Aug 27 11:51:30 2003
@@ -3804,6 +3804,13 @@
 		Cursor_getdesc(self);
 
 	list = self->definition;
+
+	if (list == NULL) {
+		TRACE(T_ERROR,("ss","Cursor_describe","description is NULL"));
+		PyErr_SetString(ProgrammingErrorObject,
+			"Describe invalid prior to statement execution");
+		return NULL;
+	}
 	Py_INCREF(list);
 
 	TRACE(T_EXIT,("s", "Cursor_describe"));




More information about the Zope-Checkins mailing list