diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-08-16 05:05:06 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-08-16 05:05:06 (GMT) |
commit | 76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049 (patch) | |
tree | 5e2120e7db3e46a36facd5b789b1681a604dcdc0 | |
parent | 81b9ecd2a3338cad109c2827af423867e46c6808 (diff) | |
parent | 10bc0f6edf4c24bffe13a0f7aae060ea477aad1e (diff) | |
download | cpython-76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049.zip cpython-76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049.tar.gz cpython-76aa1fb3b1b96120ca8fdfd48c53dc7d2a320049.tar.bz2 |
merge 3.4 (#27774)
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_sre.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -42,6 +42,8 @@ Library - In the curses module, raise an error if window.getstr() or window.instr() is passed a negative value. +- Issue #27774: Fix possible Py_DECREF on unowned object in _sre. + - Issue #27760: Fix possible integer overflow in binascii.b2a_qp. - Issue #27758: Fix possible integer overflow in the _csv module for large record diff --git a/Modules/_sre.c b/Modules/_sre.c index 84c8769..09b5835 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -2196,10 +2196,8 @@ _sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value) if (!key) goto failed; value = match_getslice(self, key, default_value); - if (!value) { - Py_DECREF(key); + if (!value) goto failed; - } status = PyDict_SetItem(result, key, value); Py_DECREF(value); if (status < 0) |