File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ What's New in Python 3.3.7?
1010Core and Builtins
1111-----------------
1212
13+ - Issue #26171: Fix possible integer overflow and heap corruption in
14+ zipimporter.get_data().
15+
1316- Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.
1417
1518- Issue #24407: Fix crash when dict is mutated while being updated.
Original file line number Diff line number Diff line change @@ -1089,6 +1089,11 @@ get_data(PyObject *archive, PyObject *toc_entry)
10891089 PyMarshal_ReadShortFromFile (fp ); /* local header size */
10901090 file_offset += l ; /* Start of file data */
10911091
1092+ if (data_size > LONG_MAX - 1 ) {
1093+ fclose (fp );
1094+ PyErr_NoMemory ();
1095+ return NULL ;
1096+ }
10921097 bytes_size = compress == 0 ? data_size : data_size + 1 ;
10931098 if (bytes_size == 0 )
10941099 bytes_size ++ ;
You can’t perform that action at this time.
0 commit comments