yakovsh commented on code in PR #442:
URL: https://github.com/apache/commons-compress/pull/442#discussion_r1401261090
##########
src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java:
##########
@@ -526,7 +526,7 @@ private void readDirectoryEntry(DumpArchiveEntry entry)
throws IOException {
final byte[] peekBytes = raw.peek();
- if (!DumpArchiveUtil.verify(peekBytes)) {
+ if (peekBytes == null || !DumpArchiveUtil.verify(peekBytes)) {
Review Comment:
It can go as well, and from the code, it looks like if false is returned, an
exception will get thrown anyway, so it makes sense to throw false if buffer is
null. I will move it. Thank you for pointing this out.
--
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]