Issue #28275: Merge bz2 fix from 3.5 into 3.6

This commit is contained in:
Martin Panter 2016-10-01 03:11:04 +00:00
commit 55c9239af6
4 changed files with 14 additions and 7 deletions

View file

@ -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;