]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 28 Oct 2018 20:59:13 +0000 (13:59 -0700)
committerGitHub <noreply@github.com>
Sun, 28 Oct 2018 20:59:13 +0000 (13:59 -0700)
commitfd0a3bce6e917b5853c809a309c1513acc176f56
treedfb7fcb427afec469240f7e0e742a991751c4725
parent5c0a9c4ac4afc9e160f81570c563a1ba91f0459b
bpo-35090: Fix potential division by zero in allocator wrappers (GH-10174)

* Fix potential division by zero in BZ2_Malloc()
* Avoid division by zero in PyLzma_Malloc()
* Avoid division by zero and integer overflow in PyZlib_Malloc()

Reported by Svace static analyzer.
(cherry picked from commit 3d4fabb2a424cb04ae446ebe4428090c386f45a5)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Modules/_bz2module.c
Modules/_lzmamodule.c
Modules/zlibmodule.c