tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stepanov <and...@drutech.org>
Subject Found bug in PSDParser.java
Date Thu, 11 Oct 2012 09:20:16 GMT
Hi.

When i parse my PSD file, i got expection:

org.apache.tika.exception.TikaException: Invalid Image Resource Block
Signature Found, got 3686985 0x384249 but the spec defines 943868237

I compared specification (
http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm)
with the source code and found the error.

*From specification:*

Image Resource Block - The resource data, described in the sections on the
individual resource types. It is padded to make the size *EVEN*.

*From source code:*

          int dataLen = EndianUtils.readIntBE(stream);
          totalLength = 4 + 2 + nameLen + 4 + dataLen;

          data = new byte[dataLen];
          IOUtils.readFully(stream, data);

*Problem: Size should be even*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message