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:50:00 UTC
[jira] [Updated] (IMAGING-333) IndexOutOfBoundsException when parsing a broken JPS image file
[ https://issues.apache.org/jira/browse/IMAGING-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dominik Stadler updated IMAGING-333:
------------------------------------
Attachment: ArrayIndexOutOfBoundsException.icon
> IndexOutOfBoundsException when parsing a broken JPS image file
> --------------------------------------------------------------
>
> Key: IMAGING-333
> URL: https://issues.apache.org/jira/browse/IMAGING-333
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: JPEG
> Affects Versions: 1.0-alpha3
> Reporter: Dominik Stadler
> Priority: Major
> Labels: fuzzer
> Attachments: ArrayIndexOutOfBoundsException.icon
>
>
> The following snippet will trigger an IndexOutOfBoundsException:
> {code:java}
> Imaging.getImageInfo(FileUtils.readFileToByteArray(new File("IndexOutOfBoundsException.jpg"))); {code}
> {code:java}
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
> at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
> at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
> at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
> at java.base/java.util.Objects.checkIndex(Objects.java:372)
> at java.base/java.util.ArrayList.get(ArrayList.java:459)
> at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getImageInfo(JpegImageParser.java:682)
> at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getImageInfo(JpegImageParser.java:65)
> at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:482)
> at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:460) {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)