tmf: Bug 507415: Fix some random file wrongly seen as Tar
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / internal / tmf / ui / project / wizards / importtrace / TarFile.java
index 101581d379f199e15c0aa52e9381bdb45478f0b9..3647aa14e2c2ceb006d344771fedfa0716b90472 100644 (file)
@@ -63,6 +63,9 @@ public class TarFile {
         entryEnumerationStream = new TarArchiveInputStream(fInputStream);
         try {
             curEntry = (TarArchiveEntry) entryEnumerationStream.getNextEntry();
+            if (!curEntry.isCheckSumOK()) {
+                throw new IOException("Error detected parsing initial entry header"); //$NON-NLS-1$
+            }
         } catch (IOException e) {
             fInputStream.close();
             throw e;
This page took 0.023588 seconds and 5 git commands to generate.