Skip to content

Commit 0c1c590

Browse files
committed
Increase chunk size after checking
1 parent 3e7d539 commit 0c1c590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/isal/isal_zlibmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,14 +1671,14 @@ IGzipReader_readall(IGzipReader *self, PyObject *Py_UNUSED(ignore))
16711671
total_size += written_size;
16721672
chunk_list[number_of_chunks] = chunk;
16731673
number_of_chunks += 1;
1674-
chunk_size *= 2;
16751674
if (written_size < chunk_size) {
16761675
// Reached the end, resize the smaller chunk
16771676
if (_PyBytes_Resize(&chunk, written_size) < 0) {
16781677
goto readall_finish;
16791678
}
16801679
break;
16811680
}
1681+
chunk_size *= 2;
16821682
}
16831683
if (number_of_chunks == 1) {
16841684
// No need for an intermediate result. Return immediately.

0 commit comments

Comments
 (0)