diff options
| author | Guido van Rossum <guido@python.org> | 2007-02-27 20:57:45 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2007-02-27 20:57:45 +0000 |
| commit | 4fc8ae424f915d07ff56d32dceec3d2c4a89560e (patch) | |
| tree | 27c11de69e5ec8b118ccade9865adf1b84c93ffc /Objects/bytesobject.c | |
| parent | 6f8fe151da16f43fc5d0c5167fc3d9432f993f70 (diff) | |
| download | cpython-git-4fc8ae424f915d07ff56d32dceec3d2c4a89560e.tar.gz | |
Fix off-by-one bug in memmove() call in bytes_insert().
Fix by Pete Shinners (for his own bug :-).
Diffstat (limited to 'Objects/bytesobject.c')
| -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 f7de8bdd86..f07130d809 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; |
