summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2023-03-17 13:39:09 (GMT)
committerGitHub <noreply@github.com>2023-03-17 13:39:09 (GMT)
commit65fb7c4055f280caaa970939d16dd947e6df8a8d (patch)
tree289309d1d747d2a101a9f54e239126baedd35c2b /Objects/dictobject.c
parent4f5774f648eafd1a7076ecf9af9629fb81baa363 (diff)
downloadcpython-65fb7c4055f280caaa970939d16dd947e6df8a8d.zip
cpython-65fb7c4055f280caaa970939d16dd947e6df8a8d.tar.gz
cpython-65fb7c4055f280caaa970939d16dd947e6df8a8d.tar.bz2
gh-102701: Fix overflow in dictobject.c (GH-102750)
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 227e438..53f9a38 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -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;
}