You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/05/23 17:39:00 UTC

[jira] [Closed] (IMAGING-335) NullPointerException in App2Segment.getIccBytes when parsing a broken JPEG file

     [ https://issues.apache.org/jira/browse/IMAGING-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory closed IMAGING-335.
-----------------------------------

> NullPointerException in App2Segment.getIccBytes when parsing a broken JPEG file
> -------------------------------------------------------------------------------
>
>                 Key: IMAGING-335
>                 URL: https://issues.apache.org/jira/browse/IMAGING-335
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 1.0-alpha3
>            Reporter: Dominik Stadler
>            Priority: Major
>         Attachments: NullPointer.jpg
>
>
> The following snipped throws a NullPointerException:
> {noformat}
> Imaging.getICCProfile(FileUtils.readFileToByteArray(new File("NullPointer.jpg"))); {noformat}
>  
> Stacktrace:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
>     at org.apache.commons.imaging.formats.jpeg.segments.App2Segment.getIccBytes(App2Segment.java:90)
>     at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getICCProfileBytes(JpegImageParser.java:294)
>     at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getICCProfileBytes(JpegImageParser.java:65)
>     at org.apache.commons.imaging.Imaging.getICCProfileBytes(Imaging.java:404)
>     at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:347)
>     at org.apache.commons.imaging.Imaging.getICCProfile(Imaging.java:318) {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)