yakovsh commented on code in PR #441:
URL: https://github.com/apache/commons-compress/pull/441#discussion_r1401289923
##########
src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java:
##########
@@ -565,7 +565,12 @@ public int getHeaderPadCount(final long nameSize) {
}
int size = this.headerSize + 1; // Name has terminating null
if (name != null) {
- size = ExactMath.add(size, nameSize);
+ try {
+ size = ExactMath.add(size, nameSize);
Review Comment:
I moved the check into ExactMath#add() and added unit tests. Let me know if
that makes sense, or if I should make this into a separate method within the
ExactMath class. Thank you!
--
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]