mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Fix off-by-one bug in memmove() call in bytes_insert().
Fix by Pete Shinners (for his own bug :-).
This commit is contained in:
parent
6f8fe151da
commit
4fc8ae424f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue