We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20fdd15 commit 50bd5deCopy full SHA for 50bd5de
Misc/NEWS
@@ -10,6 +10,9 @@ Release date: tba
10
Core and Builtins
11
-----------------
12
13
+- Issue #26171: Fix possible integer overflow and heap corruption in
14
+ zipimporter.get_data().
15
+
16
Library
17
-------
18
Modules/zipimport.c
@@ -1111,6 +1111,11 @@ get_data(PyObject *archive, PyObject *toc_entry)
1111
}
1112
file_offset += l; /* Start of file data */
1113
1114
+ if (data_size > LONG_MAX - 1) {
1115
+ fclose(fp);
1116
+ PyErr_NoMemory();
1117
+ return NULL;
1118
+ }
1119
bytes_size = compress == 0 ? data_size : data_size + 1;
1120
if (bytes_size == 0)
1121
bytes_size++;
0 commit comments