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 47069ff417
commit 22b8f2b10b
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

@ -14,7 +14,7 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.3
Release: 1%{?dist}
Release: 2%{?dist}
License: Python
@ -385,6 +385,11 @@ Patch274: 00274-fix-arch-names.patch
# Fixed upstream: https://github.com/python/cpython/commit/11045c9d8a21dd9bd182a3939189db02815f9783
Patch277: 00277-fix-test-subprocess-hanging-tests.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 @@ fi
# ======================================================
%changelog
* Mon Oct 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-2
- Fix memory corruption due to allocator mix
Resolves: rhbz#1498207
* Fri Oct 06 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-1
- Update to Python 3.6.3