[Python-3000-checkins] r54004 - python/branches/p3yk/Objects/bytesobject.c
guido.van.rossum
python-3000-checkins at python.org
Tue Feb 27 21:57:51 CET 2007
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;
More information about the Python-3000-checkins
mailing list