diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-10-07 13:16:28 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-10-07 13:16:28 (GMT) |
commit | 4e0630cb5276512541e75bc6f4dd63f7fda9bee3 (patch) | |
tree | 5652ce13624dca0f32e1b72828aa0fef35a5b434 /Objects/moduleobject.c | |
parent | 651423c1eb91a7e5a0ff346d2f52a654b765344a (diff) | |
download | cpython-4e0630cb5276512541e75bc6f4dd63f7fda9bee3.zip cpython-4e0630cb5276512541e75bc6f4dd63f7fda9bee3.tar.gz cpython-4e0630cb5276512541e75bc6f4dd63f7fda9bee3.tar.bz2 |
Issue #3740: Null-initialize module state.
Reviewed by Benjamin Peterson.
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index ae01651..7f81ce4 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -113,6 +113,7 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version) Py_DECREF(m); return NULL; } + memset(m->md_state, 0, module->m_size); } d = PyModule_GetDict((PyObject*)m); |