diff options
author | Guido van Rossum <guido@python.org> | 2007-02-27 20:57:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-27 20:57:45 (GMT) |
commit | 4fc8ae424f915d07ff56d32dceec3d2c4a89560e (patch) | |
tree | 27c11de69e5ec8b118ccade9865adf1b84c93ffc /Objects | |
parent | 6f8fe151da16f43fc5d0c5167fc3d9432f993f70 (diff) | |
download | cpython-4fc8ae424f915d07ff56d32dceec3d2c4a89560e.zip cpython-4fc8ae424f915d07ff56d32dceec3d2c4a89560e.tar.gz cpython-4fc8ae424f915d07ff56d32dceec3d2c4a89560e.tar.bz2 |
Fix off-by-one bug in memmove() call in bytes_insert().
Fix by Pete Shinners (for his own bug :-).
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index f7de8bd..f07130d 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2313,7 +2313,7 @@ bytes_insert(PyBytesObject *self, PyObject *args) } 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; |