Riccardo Sirchia created MANTRUN-194:
----------------------------------------

             Summary: Incorrect handling of NUL username and group Tar.gz 
entries
                 Key: MANTRUN-194
                 URL: https://issues.apache.org/jira/browse/MANTRUN-194
             Project: Maven Antrun Plugin
          Issue Type: Bug
    Affects Versions: 1.8
            Reporter: Riccardo Sirchia


This issue is most likely related to the issue described in COMPRESS-278

When using version 1.8 of the maven-antrun-plugin to untar for example the 
artifact 
[apache-activemq-5.11.1-bin.tar.gz|http://search.maven.org/remotecontent?filepath=org/apache/activemq/apache-activemq/5.11.1/apache-activemq-5.11.1-bin.tar.gz]
 artifact from maven central, I get the following stacktrace:

{code}

java.io.IOException: Error detected parsing the header
        at org.apache.tools.ant.taskdefs.Untar.expandFile(Untar.java:116)
        at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:132)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at 
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:313)
        ... 21 more
Caused by: java.io.IOException: Error detected parsing the header
        at 
org.apache.tools.tar.TarInputStream.getNextEntry(TarInputStream.java:292)
        at org.apache.tools.ant.taskdefs.Untar.expandStream(Untar.java:165)
        at org.apache.tools.ant.taskdefs.Untar.expandFile(Untar.java:114)
        ... 34 more
Caused by: java.lang.IllegalArgumentException: Invalid byte 32 at offset 7 in ' 
      {NUL}' len=8
        at org.apache.tools.tar.TarUtils.parseOctal(TarUtils.java:134)
        at org.apache.tools.tar.TarUtils.parseOctalOrBinary(TarUtils.java:172)
        at org.apache.tools.tar.TarEntry.parseTarHeader(TarEntry.java:912)
        at org.apache.tools.tar.TarEntry.parseTarHeader(TarEntry.java:899)
        at org.apache.tools.tar.TarEntry.<init>(TarEntry.java:323)
        at 
org.apache.tools.tar.TarInputStream.getNextEntry(TarInputStream.java:290)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to