Index: src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
===================================================================
--- src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java	(revision 1402201)
+++ src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java	(working copy)
@@ -305,6 +305,8 @@
         if (headerBuf == null) {
             hasHitEOF = true;
         } else if (buffer.isEOFRecord(headerBuf)) {
+            // COMPRESS-206 Consume the second EOF buffer (see TarArchiveOutputStream.finish()).
+            buffer.readRecord();
             hasHitEOF = true;
         }
 
Index: src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java
===================================================================
--- src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java	(revision 1402201)
+++ src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStreamTest.java	(working copy)
@@ -18,22 +18,28 @@
 
 package org.apache.commons.compress.archivers.tar;
 
+import static org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.LONGFILE_GNU;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URL;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Map;
 import java.util.TimeZone;
 
+import org.apache.commons.compress.archivers.ArchiveEntry;
 import org.apache.commons.compress.utils.CharsetNames;
+import org.apache.commons.compress.utils.IOUtils;
 import org.junit.Test;
 
 public class TarArchiveInputStreamTest {
@@ -103,6 +109,57 @@
         datePriorToEpoch("/preepoch-posix.tar");
     }
 
+    @Test
+    public void consumeGarbageBeyondEndOfArchive() throws Exception {
+        // COMPRESS-206 To recreate the circumstances for this bug, the actual
+        // content is unimportant, but the length is.
+        byte[] content1 = new byte[8];
+        Arrays.fill(content1, (byte) 1);
+        byte[] content2 = new byte[38652];
+        Arrays.fill(content2, (byte) 2);
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        TarArchiveOutputStream tar = new TarArchiveOutputStream(out);
+        tar.setLongFileMode(LONGFILE_GNU);
+        putArchiveEntry(tar, ".size", content1);
+        putArchiveEntry(tar, "0.ctr", content2);
+        tar.finish();
+
+        // Write some user data after the tar data.
+        // In practice, this could be a checksum for example.
+        int userData = 3;
+        out.write(userData);
+
+        byte[] data = out.toByteArray();
+        ByteArrayInputStream in = new ByteArrayInputStream(data);
+        TarArchiveInputStream untar = new TarArchiveInputStream(in);
+        untar.getNextTarEntry();
+        // We don't care about the actual content, just be sure to consume it.
+        ByteArrayOutputStream untarredContent1 = new ByteArrayOutputStream();
+        IOUtils.copy(untar, untarredContent1);
+        untar.getNextTarEntry();
+        ByteArrayOutputStream untarredContent2 = new ByteArrayOutputStream();
+        IOUtils.copy(untar, untarredContent2);
+        assertNull(untar.getNextTarEntry());
+
+        assertEquals(userData, in.read());
+        assertEquals(-1, in.read());
+    }
+
+    private static void putArchiveEntry(TarArchiveOutputStream tar,
+            String name, final byte[] content) throws IOException {
+        // We need a file with the correct length to create a "virtual" tar entry.
+        ArchiveEntry entry = tar.createArchiveEntry(new File(name) {
+
+            @Override
+            public long length() {
+                return content.length;
+            }
+        }, name);
+        tar.putArchiveEntry(entry);
+        tar.write(content);
+        tar.closeArchiveEntry();
+    }
+
     private void datePriorToEpoch(String archive) throws Exception {
         URL tar = getClass().getResource(archive);
         TarArchiveInputStream in = null;
