diff Objects/moduleobject.c @ 49461:82091df651be

Issue #3740: Null-initialize module state. Reviewed by Benjamin Peterson.
author Martin v. Löwis <martin@v.loewis.de>
date Tue, 07 Oct 2008 13:16:28 +0000
parents 85b67fb5672b
children bd0e361bd642
line wrap: on
line diff
--- a/Objects/moduleobject.c	Tue Oct 07 07:03:04 2008 +0000
+++ b/Objects/moduleobject.c	Tue Oct 07 13:16:28 2008 +0000
@@ -113,6 +113,7 @@
 			Py_DECREF(m);
 			return NULL;
 		}
+		memset(m->md_state, 0, module->m_size);
 	}
 			
 	d = PyModule_GetDict((PyObject*)m);