Kaydet (Commit) 5f7e8dab authored tarafından Christian Heimes's avatar Christian Heimes

Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation failure

üst 17ad40e4
...@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1? ...@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation
failure.
- Issue #16546: Fix: ast.YieldFrom argument is now mandatory. - Issue #16546: Fix: ast.YieldFrom argument is now mandatory.
- Issue #16514: Fix regression causing a traceback when sys.path[0] is None - Issue #16514: Fix regression causing a traceback when sys.path[0] is None
......
...@@ -43,6 +43,7 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable) ...@@ -43,6 +43,7 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable)
buffers = PyMem_NEW(Py_buffer, seqlen); buffers = PyMem_NEW(Py_buffer, seqlen);
if (buffers == NULL) { if (buffers == NULL) {
Py_DECREF(seq); Py_DECREF(seq);
PyErr_NoMemory();
return NULL; return NULL;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment