You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "garydgregory (via GitHub)" <gi...@apache.org> on 2023/03/16 13:23:37 UTC

[GitHub] [commons-compress] garydgregory commented on a diff in pull request #368: COMPRESS-642 Integer overflow ArithmeticException in TarArchiveOutputStream

garydgregory commented on code in PR #368:
URL: https://github.com/apache/commons-compress/pull/368#discussion_r1138651600


##########
src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java:
##########
@@ -348,7 +348,7 @@ public void closeArchiveEntry() throws IOException {
                 + "' before the '" + currSize
                 + "' bytes specified in the header were written");
         }
-        recordsWritten = ExactMath.add(recordsWritten, (currSize / RECORD_SIZE));
+        recordsWritten += (currSize / RECORD_SIZE);
 

Review Comment:
   Remove useless parens.



-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org