< prev index next >
src/java.base/share/native/libzip/zip_util.c
Print this page
@@ -1402,13 +1402,11 @@
pos += n;
count -= n;
strm.next_in = (Bytef *)tmp;
strm.avail_in = n;
do {
- switch (inflate(&strm, Z_PARTIAL_FLUSH)) {
- case Z_OK:
- break;
+ switch (inflate(&strm, Z_FINISH)) {
case Z_STREAM_END:
if (count != 0 || strm.total_out != entry->size) {
*msg = "inflateFully: Unexpected end of stream";
inflateEnd(&strm);
return JNI_FALSE;
@@ -1522,12 +1520,13 @@
strm.avail_out = (uInt)outLen;
strm.next_in = (Bytef *) inBuf;
strm.avail_in = (uInt)inLen;
do {
- switch (inflate(&strm, Z_PARTIAL_FLUSH)) {
+ switch (inflate(&strm, Z_FINISH)) {
case Z_OK:
+ case Z_BUF_ERROR:
break;
case Z_STREAM_END:
if (strm.total_out != outLen) {
*pmsg = "INFLATER_inflateFully: Unexpected end of stream";
inflateEnd(&strm);
< prev index next >