]> granicus.if.org Git - python/commitdiff
Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation failure
authorChristian Heimes <christian@cheimes.de>
Sun, 2 Dec 2012 06:56:42 +0000 (07:56 +0100)
committerChristian Heimes <christian@cheimes.de>
Sun, 2 Dec 2012 06:56:42 +0000 (07:56 +0100)
Misc/NEWS
Objects/stringlib/join.h

index 739a5eac7d3552cc2f16e64d1544c286088e6b20..11a313f6aaef7cc284c7b54b057e7b67fd535ec0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
 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 #16514: Fix regression causing a traceback when sys.path[0] is None
index d1d6e532c57294699ff5d601f006f87fd95b876d..5568b31dab860f576233e40afde43aff57d013dd 100644 (file)
@@ -43,6 +43,7 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable)
         buffers = PyMem_NEW(Py_buffer, seqlen);
         if (buffers == NULL) {
             Py_DECREF(seq);
+            PyErr_NoMemory();
             return NULL;
         }
     }