Skip to content

Commit 9b4a1b1

Browse files
ZackerySpytzmiss-islington
authored andcommitted
bpo-36374: Fix a possible null pointer dereference (GH-12449)
https://bugs.python.org/issue36374
1 parent fa15376 commit 9b4a1b1

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a possible null pointer dereference in ``merge_consts_recursive()``.
2+
Patch by Zackery Spytz.

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ merge_consts_recursive(struct compiler *c, PyObject *o)
12101210
PyObject *t = PyDict_SetDefault(c->c_const_cache, key, key);
12111211
if (t != key) {
12121212
// o is registered in c_const_cache. Just use it.
1213-
Py_INCREF(t);
1213+
Py_XINCREF(t);
12141214
Py_DECREF(key);
12151215
return t;
12161216
}

0 commit comments

Comments
 (0)