pjfanning commented on code in PR #1027:
URL: https://github.com/apache/poi/pull/1027#discussion_r2895320572
##########
poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveThresholdInputStream.java:
##########
@@ -120,6 +121,17 @@ private void checkThreshold() throws IOException {
rawSize = 0;
}
+ // If available, read compressed size via
ZipArchiveEntry.getCompressedSize() which takes
+ // data from the Zip central directory header. This is because the
ZipArchiveInputStream
+ // "may return unknown sizes and CRC values for entries until the next
entry has been
+ // reached if the archive uses the data descriptor feature."
+ if (entry != null) {
Review Comment:
I'm not against doing an additional check with this value but ignored the
stats object is a no-no for me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]