mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603)
This commit is contained in:
parent
c38e725d17
commit
24ddd9c2d6
1 changed files with 1 additions and 1 deletions
|
@ -743,7 +743,7 @@ tailmatch(const char *str, Py_ssize_t len, PyObject *substr,
|
|||
|
||||
if (direction < 0) {
|
||||
/* startswith */
|
||||
if (start + slen > len)
|
||||
if (start > len - slen)
|
||||
goto notfound;
|
||||
} else {
|
||||
/* endswith */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue