< prev index next >

src/java.base/share/native/libzip/zip_util.c

Print this page

        

*** 1402,1414 **** pos += n; count -= n; strm.next_in = (Bytef *)tmp; strm.avail_in = n; do { ! switch (inflate(&strm, Z_PARTIAL_FLUSH)) { ! case Z_OK: ! break; case Z_STREAM_END: if (count != 0 || strm.total_out != entry->size) { *msg = "inflateFully: Unexpected end of stream"; inflateEnd(&strm); return JNI_FALSE; --- 1402,1412 ---- pos += n; count -= n; strm.next_in = (Bytef *)tmp; strm.avail_in = n; do { ! 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,1533 **** strm.avail_out = (uInt)outLen; strm.next_in = (Bytef *) inBuf; strm.avail_in = (uInt)inLen; do { ! switch (inflate(&strm, Z_PARTIAL_FLUSH)) { case Z_OK: break; case Z_STREAM_END: if (strm.total_out != outLen) { *pmsg = "INFLATER_inflateFully: Unexpected end of stream"; inflateEnd(&strm); --- 1520,1532 ---- strm.avail_out = (uInt)outLen; strm.next_in = (Bytef *) inBuf; strm.avail_in = (uInt)inLen; do { ! 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 >