From: Serhiy Storchaka Date: Mon, 4 Feb 2013 10:54:04 +0000 (+0200) Subject: Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple X-Git-Tag: v3.3.1rc1~232 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d0bb9c8f97b0f4fc6717f73555576f523965e42;p=python Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple parses nested mutating sequence. --- 1d0bb9c8f97b0f4fc6717f73555576f523965e42 diff --cc Misc/NEWS index 97e391e6ad,c5a64c220f..8ca4b01c61 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -163,8 -212,9 +163,11 @@@ Core and Builtin Library ------- + - Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple + parses nested mutating sequence. + +- Issue #5289: Fix ctypes.util.find_library on Solaris. + - Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying stream or a decoder produces data of an unexpected type (i.e. when io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec). diff --cc Modules/resource.c index 1aed497f9b,cadf9e6dff..b294a8cfe1 --- a/Modules/resource.c +++ b/Modules/resource.c @@@ -181,11 -195,16 +193,16 @@@ resource_setrlimit(PyObject *self, PyOb PyErr_SetString(PyExc_ValueError, "not allowed to raise maximum limit"); else - PyErr_SetFromErrno(ResourceError); + PyErr_SetFromErrno(PyExc_OSError); - return NULL; + goto error; } + Py_DECREF(limits); Py_INCREF(Py_None); return Py_None; + + error: + Py_DECREF(limits); + return NULL; } static PyObject *