[ https://issues.apache.org/jira/browse/TIKA-794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13158113#comment-13158113 ]
Nick Burch commented on TIKA-794: --------------------------------- Bytes reversed in r1206937, which allows CPIO detection to work correctly > Mime magic logic for Little16 is incorrect > ------------------------------------------ > > Key: TIKA-794 > URL: https://issues.apache.org/jira/browse/TIKA-794 > Project: Tika > Issue Type: Bug > Components: mime > Affects Versions: 1.0 > Reporter: Nick Burch > Assignee: Nick Burch > Fix For: 1.1 > > > The mime magic logic for big16 and little16 seems to be the same: > } else if (type.equals("host16") || type.equals("little16")) { > int i = Integer.parseInt(tmpVal, radix); > decoded = new byte[] { (byte) (i >> 8), (byte) (i & 0x00FF) }; > } else if (type.equals("big16")) { > int i = Integer.parseInt(tmpVal, radix); > decoded = new byte[] { (byte) (i >> 8), (byte) (i & 0x00FF) }; > It looks like both are calculating the big endian version, which is breaking > CPIO detection -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira