cpython: d6bf506ea13f (original) (raw)

Mercurial > cpython

changeset 79880:d6bf506ea13f

Merge #14398: Fix size truncation and overflow bugs in bz2 module. [#14398]

Nadeem Vawda nadeem.vawda@gmail.com
date Sun, 21 Oct 2012 21:19:11 +0200
parents 92656b5df2f2(current diff)25fdf297c077(diff)
children c8217046e2cd
files Lib/test/test_bz2.py Misc/NEWS
diffstat 2 files changed, 26 insertions(+), 9 deletions(-)[+] [-] Misc/NEWS 2 Modules/_bz2module.c 33

line wrap: on

line diff

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -59,6 +59,8 @@ Core and Builtins Library ------- +- Issue #14398: Fix size truncation and overflow bugs in the bz2 module. +

--- a/Modules/_bz2module.c +++ b/Modules/_bz2module.c @@ -123,7 +123,14 @@ grow_buffer(PyObject **buf) giving us amortized linear-time behavior. Use a less-than-double growth factor to avoid excessive allocation. */ size_t size = PyBytes_GET_SIZE(*buf);

} @@ -169,10 +176,14 @@ compress(BZ2Compressor *c, char *data, s break; if (c->bzs.avail_out == 0) {