Thanks to visit codestin.com Credit goes to github.com
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.
2 parents ba77788 + 47b8ba2 commit 2b0b5acCopy full SHA for 2b0b5ac
2 files changed
Misc/NEWS
@@ -140,6 +140,9 @@ Core and Builtins
140
converted to normal strings at run time. Given x=3, then
141
f'value={x}' == 'value=3'. Patch by Eric V. Smith.
142
143
+- Issue #26171: Fix possible integer overflow and heap corruption in
144
+ zipimporter.get_data().
145
+
146
Library
147
-------
148
Modules/zipimport.c
@@ -1127,6 +1127,11 @@ get_data(PyObject *archive, PyObject *toc_entry)
1127
}
1128
file_offset += l; /* Start of file data */
1129
1130
+ if (data_size > LONG_MAX - 1) {
1131
+ fclose(fp);
1132
+ PyErr_NoMemory();
1133
+ return NULL;
1134
+ }
1135
bytes_size = compress == 0 ? data_size : data_size + 1;
1136
if (bytes_size == 0)
1137
bytes_size++;
0 commit comments