Author: guido.van.rossum
Date: Tue Feb 27 21:57:45 2007
New Revision: 54004
Modified:
python/branches/p3yk/Objects/bytesobject.c
Log:
Fix off-by-one bug in memmove() call in bytes_insert().
Fix by Pete Shinners (for his own bug :-).
Modified: python/branches/p3yk/Objects/bytesobject.c
==============================================================================
--- python/branches/p3yk/Objects/bytesobject.c (original)
+++ python/branches/p3yk/Objects/bytesobject.c Tue Feb 27 21:57:45 2007
@@ -2313,7 +2313,7 @@
}
if (where > n)
where = n;
- memmove(self->ob_bytes + where + 1, self->ob_bytes + where, n - where + 1);
+ memmove(self->ob_bytes + where + 1, self->ob_bytes + where, n - where);
self->ob_bytes[where] = value;
Py_RETURN_NONE;
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins