Fix memory corruption due to allocator mix (rhbz#1498207)

This commit is contained in:
Charalampos Stratakis 2017-10-09 13:10:17 +02:00
parent f7d3d35029
commit 6937b68312
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/Modules/getpath.c b/Modules/getpath.c
index c4055be..1258fcd 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -735,7 +735,7 @@ calculate_path(void)
bufsz += wcslen(zip_path) + 1;
bufsz += wcslen(exec_prefix) + 1;
- buf = PyMem_New(wchar_t, bufsz);
+ buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t));
if (buf == NULL) {
Py_FatalError(
"Not enough memory for dynamic PYTHONPATH");

View File

@ -112,7 +112,7 @@
Summary: Version 3 of the Python programming language aka Python 3000
Name: python3
Version: %{pybasever}.4
Release: 1%{?dist}
Release: 2%{?dist}
License: Python
Group: Development/Languages
@ -389,6 +389,11 @@ Patch206: 00206-remove-hf-from-arm-triplet.patch
# Fedora needs the default mips64-linux-gnu
Patch243: 00243-fix-mips64-triplet.patch
# 00279 #
# Fix memory corruption due to allocator mix
# Fixed upstream: https://bugs.python.org/issue31532
Patch279: 00279-fix-memory-corruption-due-to-allocator-mix.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -1532,6 +1537,10 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Mon Oct 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.5.4-2
- Fix memory corruption due to allocator mix
Resolves: rhbz#1498207
* Wed Aug 23 2017 Petr Viktorin <pviktori@redhat.com> - 3.5.4-1
- Update to 3.5.4
see https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-4