Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-794

Mime magic logic for Little16 is incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1
    • mime
    • None

    Description

      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

      Attachments

        Activity

          People

            nick Nick Burch
            nick Nick Burch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: