[Python-checkins] cpython (merge 3.4 -> default): merge 3.4 (closes #22605)

benjamin.peterson python-checkins at python.org
Sat Oct 11 02:58:49 CEST 2014


https://hg.python.org/cpython/rev/8165e44594c2
changeset:   92946:8165e44594c2
parent:      92944:cb94764bf8be
parent:      92945:4563fff4e099
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Oct 10 20:58:43 2014 -0400
summary:
  merge 3.4 (closes #22605)

files:
  Modules/arraymodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -2709,7 +2709,7 @@
                     self->allocated = Py_SIZE(self);
                 }
             }
-            else if (initial != NULL && array_Check(initial)) {
+            else if (initial != NULL && array_Check(initial) && len > 0) {
                 arrayobject *self = (arrayobject *)a;
                 arrayobject *other = (arrayobject *)initial;
                 memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list