summaryrefslogtreecommitdiffstats
path: root/Modules/_bz2module.c
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-10-01 03:11:04 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-10-01 03:11:04 (GMT)
commit55c9239af613682ec141bf6b2c4eb77497943088 (patch)
treeccc9268a47f8b36c879bf4f1f336b4a8f1118438 /Modules/_bz2module.c
parentef223a19f76101a914ccff8b4690d9e4717e109e (diff)
parent38317d3318e05832a864d413aa744a48a8975dce (diff)
downloadcpython-55c9239af613682ec141bf6b2c4eb77497943088.zip
cpython-55c9239af613682ec141bf6b2c4eb77497943088.tar.gz
cpython-55c9239af613682ec141bf6b2c4eb77497943088.tar.bz2
Issue #28275: Merge bz2 fix from 3.5 into 3.6
Diffstat (limited to 'Modules/_bz2module.c')
-rw-r--r--Modules/_bz2module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c
index f4077fa..5cea42c 100644
--- a/Modules/_bz2module.c
+++ b/Modules/_bz2module.c
@@ -534,8 +534,10 @@ decompress(BZ2Decompressor *d, char *data, size_t len, Py_ssize_t max_length)
}
result = decompress_buf(d, max_length);
- if(result == NULL)
+ if(result == NULL) {
+ bzs->next_in = NULL;
return NULL;
+ }
if (d->eof) {
d->needs_input = 0;