]> granicus.if.org Git - python/commitdiff
Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 Feb 2013 10:54:04 +0000 (12:54 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 Feb 2013 10:54:04 +0000 (12:54 +0200)
parses nested mutating sequence.

1  2 
Lib/test/test_functools.py
Misc/NEWS
Modules/_ctypes/_ctypes.c
Modules/_functoolsmodule.c
Modules/resource.c

Simple merge
diff --cc Misc/NEWS
index 97e391e6ad14c2cbc3f68ff7375a51b003bf2a78,c5a64c220f13fa9e3992ffb995008fbd614538bf..8ca4b01c6183aa47e5b04adbe5f9d5e14bd4e410
+++ 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).
Simple merge
Simple merge
index 1aed497f9bb829baa9c0cb7c3e80aa75d57dc7f9,cadf9e6dff36e27afff3d81b2e6d6c2619bad73d..b294a8cfe169bbc209e7e183b2eedbe018ed14b0
@@@ -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 *