[
https://issues.apache.org/jira/browse/IMAGING-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120016#comment-17120016
]
Bruno P. Kinoshita commented on IMAGING-256:
--------------------------------------------
Hi [~davidekholm]
I couldn't reproduce the bug with the JpegXmpRewriter with some very simple XMP
to rewrite.
Could you provide a small code snippet to reproduce it, please?
Thanks!
Bruno
> ArrayIndexOutOfBounds exception in JpegXmpRewriter.updateXmpXml()
> -----------------------------------------------------------------
>
> Key: IMAGING-256
> URL: https://issues.apache.org/jira/browse/IMAGING-256
> Project: Commons Imaging
> Issue Type: Bug
> Components: imaging.common.*
> Affects Versions: 1.0-alpha1
> Reporter: David Ekholm
> Priority: Blocker
> Fix For: 0.94-incubator
>
> Attachments: Overhead_16_reduced.jpg
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Got the attached image passed to me. It triggers the following exception:
> {noformat}
> java.lang.IndexOutOfBoundsException: Range [65535, 65535 + 65535) out of
> bounds for length 77353
> at
> java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
> at
> java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromIndexSize(Preconditions.java:82)
> at
> java.base/jdk.internal.util.Preconditions.checkFromIndexSize(Preconditions.java:343)
> at java.base/java.util.Objects.checkFromIndexSize(Objects.java:425)
> at
> java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:129)
> at
> org.apache.commons.imaging.formats.jpeg.xmp.JpegXmpRewriter.writeXmpSegment(JpegXmpRewriter.java:200)
> at
> org.apache.commons.imaging.formats.jpeg.xmp.JpegXmpRewriter.updateXmpXml(JpegXmpRewriter.java:184)
> at
> org.apache.commons.imaging.formats.jpeg.xmp.JpegXmpRewriter.updateXmpXml(JpegXmpRewriter.java:124)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)