cpython: 51627344fc58 (original) (raw)

Mercurial > cpython

changeset 102839:51627344fc58 3.5

Issue #27587: Move null pointer check earlier in _PyState_AddModule() This was found by PVS-Studio: V595 The 'def' pointer was utilized before it was verified against nullptr. Check lines: 286, 292. pystate.c 286 Initial patch by Christian Heimes. [#27587]

Berker Peksag berker.peksag@gmail.com
date Mon, 22 Aug 2016 18:05:56 +0300
parents 7eea5b87f5fa
children 7d90bf4780ff e3466a556d81
files Misc/NEWS Python/pystate.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-)[+] [-] Misc/NEWS 4 Python/pystate.c 6

line wrap: on

line diff

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,10 @@ Release date: TBA Core and Builtins ----------------- +- Issue #27587: Fix another issue found by PVS-Studio: Null pointer check

--- a/Python/pystate.c +++ b/Python/pystate.c @@ -281,14 +281,16 @@ int _PyState_AddModule(PyObject* module, struct PyModuleDef* def) { PyInterpreterState *state;