This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: undefined behavior in tailmatch() of bytes_methods.c
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, serhiy.storchaka, shihai1991
Priority: normal Keywords: patch

Created on 2019-10-06 10:51 by shihai1991, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 16603 merged shihai1991, 2019-10-06 10:53
PR 16604 merged miss-islington, 2019-10-06 12:18
PR 16605 merged miss-islington, 2019-10-06 12:18
Messages (4)
msg354032 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2019-10-06 10:51
`if (start + slen > len)` would cause undefined behavior?
such as: start=PY_SSIZE_T_MAX, slen=1

REFS:
[1] https://github.com/python/cpython/blob/master/Objects/bytes_methods.c#L746
msg354035 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-10-06 12:17
New changeset 24ddd9c2d6ab61cbce7e68d6de36d4df9bd2c3fb by Serhiy Storchaka (Hai Shi) in branch 'master':
bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603)
https://github.com/python/cpython/commit/24ddd9c2d6ab61cbce7e68d6de36d4df9bd2c3fb
msg354036 - (view) Author: miss-islington (miss-islington) Date: 2019-10-06 12:36
New changeset b40442ba88fec5e64ab1802ce37df0afec59fa53 by Miss Islington (bot) in branch '3.7':
bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603)
https://github.com/python/cpython/commit/b40442ba88fec5e64ab1802ce37df0afec59fa53
msg354037 - (view) Author: miss-islington (miss-islington) Date: 2019-10-06 12:37
New changeset ce3c913909746aa1d782ed8bca5076a656422931 by Miss Islington (bot) in branch '3.8':
bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603)
https://github.com/python/cpython/commit/ce3c913909746aa1d782ed8bca5076a656422931
History
Date User Action Args
2022-04-11 14:59:21adminsetgithub: 82564
2019-10-06 12:37:22miss-islingtonsetmessages: + msg354037
2019-10-06 12:36:47miss-islingtonsetnosy: + miss-islington
messages: + msg354036
2019-10-06 12:20:04serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-10-06 12:18:58miss-islingtonsetpull_requests: + pull_request16193
2019-10-06 12:18:51miss-islingtonsetpull_requests: + pull_request16192
2019-10-06 12:17:22serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg354035
2019-10-06 10:53:12shihai1991setkeywords: + patch
stage: patch review
pull_requests: + pull_request16191
2019-10-06 10:51:34shihai1991create