diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-07-24 09:58:25 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-07-24 09:58:25 (GMT) |
commit | 045c451ff4151ec4ecfd91a3f2888f0214dadc92 (patch) | |
tree | ec5c1f3d73d0eb4483de9c093a1ccf838f85acf8 | |
parent | 3b77d01dbc9e7cf8e32803a307f2ecf7b2bf0f05 (diff) | |
download | cpython-045c451ff4151ec4ecfd91a3f2888f0214dadc92.zip cpython-045c451ff4151ec4ecfd91a3f2888f0214dadc92.tar.gz cpython-045c451ff4151ec4ecfd91a3f2888f0214dadc92.tar.bz2 |
Issue #24704: Fixed possible NULL pointer dereferencing in the _json module
initialization. Patch by Pankaj Sharma.
-rw-r--r-- | Modules/_json.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 3349b0c..121126d 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -2419,6 +2419,8 @@ init_json(void) if (PyType_Ready(&PyEncoderType) < 0) return; m = Py_InitModule3("_json", speedups_methods, module_doc); + if (m == NULL) + return; Py_INCREF((PyObject*)&PyScannerType); PyModule_AddObject(m, "make_scanner", (PyObject*)&PyScannerType); Py_INCREF((PyObject*)&PyEncoderType); |