Issue 36285: Integer overflow in array.array.remove() (original ) (raw ) Issue36285
Created on 2019-03-14 00:02 by sth , last changed 2022-04-11 14:59 by admin . This issue is now closed .
Pull Requests
URL
Status
Linked
Edit
PR 12317
merged
sth,2019-03-14 00:17
Messages (3)
msg337889 - (view)
Author: Stephan Hohe (sth) *
Date: 2019-03-14 00:02
The array module's `array.remove(x)` iterates over the array, searching for `x`. If the array contains >=2G elements this can overflow the `int` loop variable. `array__array_reconstructor_impl()` also contains loops with `int` variables that likely have the similar problems. Changing the loop variables to `Py_ssize_t` fixes the problem. For details see the PR.
msg338508 - (view)
Author: Serhiy Storchaka (serhiy.storchaka) *
Date: 2019-03-20 19:49
New changeset aa3ecb80416958eb6fe8cc1b0dfbbfdfbcccead1 by Serhiy Storchaka (sth) in branch 'master': bpo-36285 : Fix integer overflow in the array module. (GH-12317 ) https://github.com/python/cpython/commit/aa3ecb80416958eb6fe8cc1b0dfbbfdfbcccead1
msg378767 - (view)
Author: Irit Katriel (iritkatriel) *
Date: 2020-10-16 22:15
Can this be closed? It was not backported to 3.7, but that's over now right?
History
Date
User
Action
Args
2022-04-11 14:59:12
admin
set
github: 80466
2020-10-18 09:37:52
serhiy.storchaka
set
status: open -> closedresolution: fixedstage: patch review -> resolved
2020-10-16 22:15:13
iritkatriel
set
nosy: + iritkatriel messages: +
2019-03-20 19:49:43
serhiy.storchaka
set
messages: +
2019-03-14 01:14:40
xtreak
set
nosy: + vstinner , serhiy.storchaka
2019-03-14 00:17:53
sth
set
keywords: + patch stage: patch reviewpull_requests: + <pull%5Frequest12291>
2019-03-14 00:02:42
sth
create