From 8ee2fcb9bc2b395d67610123ff0a15ada1ab75bd Mon Sep 17 00:00:00 2001
From: John Kodis <john.kodis@nasa.gov>
Date: Mon, 5 Dec 2011 15:23:43 -0500
Subject: [PATCH 4/4] Prefer octal over binary size representation.

The expression representing the largest value that an eleven-digit
octal number can contain must be forced to a long integer value, as
otherwise it overflows the limits of an int and evaluates to zero.
---
 .../commons/compress/archivers/tar/TarUtils.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
index e6d15ec..7647d88 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
@@ -320,7 +320,7 @@ public class TarUtils {
     public static int formatLongOctalOrBinaryBytes(
         final long value, byte[] buf, final int offset, final int length) {
 
-        if (value < (1 << 34))
+        if (value < (1L << 34))
             return formatLongOctalBytes(value, buf, offset, length);
 
         long val = value;
-- 
1.7.7.3

