You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dominik Stadler (Jira)" <ji...@apache.org> on 2022/05/21 05:55:00 UTC
[jira] [Created] (IMAGING-334) ArrayIndexOutOfBoundsException in IcnsDecoder when parsing a broken ICNS file
Dominik Stadler created IMAGING-334:
---------------------------------------
Summary: ArrayIndexOutOfBoundsException in IcnsDecoder when parsing a broken ICNS file
Key: IMAGING-334
URL: https://issues.apache.org/jira/browse/IMAGING-334
Project: Commons Imaging
Issue Type: Bug
Components: Format: ICNS
Affects Versions: 1.0-alpha3
Reporter: Dominik Stadler
Attachments: ArrayIndexOutOfBoundsException.icon
The following snipped throws an ArrayIndexOutOfBoundsException:
{noformat}
Imaging.getAllBufferedImages(FileUtils.readFileToByteArray(new File("ArrayIndexOutOfBoundsException.icon"))); {noformat}
{noformat}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 65539 out of bounds for length 65536
at org.apache.commons.imaging.formats.icns.Rle24Compression.decompress(Rle24Compression.java:51)
at org.apache.commons.imaging.formats.icns.IcnsDecoder.decodeImageImpl(IcnsDecoder.java:254)
at org.apache.commons.imaging.formats.icns.IcnsDecoder.decodeImage(IcnsDecoder.java:241)
at org.apache.commons.imaging.formats.icns.IcnsDecoder.decodeAllImages(IcnsDecoder.java:197)
at org.apache.commons.imaging.formats.icns.IcnsImageParser.getAllBufferedImages(IcnsImageParser.java:246)
at org.apache.commons.imaging.Imaging.getAllBufferedImages(Imaging.java:758)
at org.apache.commons.imaging.Imaging.getAllBufferedImages(Imaging.java:741) {noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)