]> granicus.if.org Git - python/commitdiff
My last fix left n used unitialized in tha a==b case.
authorMichael W. Hudson <mwh@python.net>
Fri, 15 Aug 2003 12:06:41 +0000 (12:06 +0000)
committerMichael W. Hudson <mwh@python.net>
Fri, 15 Aug 2003 12:06:41 +0000 (12:06 +0000)
Fix, by not using n at all in that case.

Needs to be applied to release23-maint, too.

Objects/listobject.c

index ed2820093c5c364628e1f09bef9ec5ef3470b0af..727c9e6d692112cd5fbb1c8d988a8c2b5a27281c 100644 (file)
@@ -475,7 +475,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v)
                if (a == b) {
                        /* Special case "a[i:j] = a" -- copy b first */
                        int ret;
-                       v = list_slice(b, 0, n);
+                       v = list_slice(b, 0, b->ob_size);
                        if (v == NULL)
                                return -1;
                        ret = list_ass_slice(a, ilow, ihigh, v);