mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-102701: Fix overflow in dictobject.c (GH-102750)
This commit is contained in:
parent
4f5774f648
commit
65fb7c4055
3 changed files with 11 additions and 1 deletions
|
|
@ -596,7 +596,7 @@ new_keys_object(PyInterpreterState *interp, uint8_t log2_size, bool unicode)
|
|||
|
||||
assert(log2_size >= PyDict_LOG_MINSIZE);
|
||||
|
||||
usable = USABLE_FRACTION(1<<log2_size);
|
||||
usable = USABLE_FRACTION((size_t)1<<log2_size);
|
||||
if (log2_size < 8) {
|
||||
log2_bytes = log2_size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue