| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,9 @@ What's New in Python 3.3.7? | |||
| 10 | 10 | Core and Builtins | |
| 11 | 11 | ----------------- | |
| 12 | 12 | ||
| 13 | + - Issue #26171: Fix possible integer overflow and heap corruption in | ||
| 14 | + zipimporter.get_data(). | ||
| 15 | + | ||
| 13 | 16 | - Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache. | |
| 14 | 17 | ||
| 15 | 18 | - 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) | |||
| 1089 | 1089 | PyMarshal_ReadShortFromFile(fp); /* local header size */ | |
| 1090 | 1090 | file_offset += l; /* Start of file data */ | |
| 1091 | 1091 | ||
| 1092 | + if (data_size > LONG_MAX - 1) { | ||
| 1093 | + fclose(fp); | ||
| 1094 | + PyErr_NoMemory(); | ||
| 1095 | + return NULL; | ||
| 1096 | + } | ||
| 1092 | 1097 | bytes_size = compress == 0 ? data_size : data_size + 1; | |
| 1093 | 1098 | if (bytes_size == 0) | |
| 1094 | 1099 | bytes_size++; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments