commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IMAGING-130) Reading of some GIF images throws java.io.IOException: AddStringToTable: codes: 4096 code_size: 12
Date Sat, 30 Dec 2017 10:52:00 GMT

    [ https://issues.apache.org/jira/browse/IMAGING-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306706#comment-16306706
] 

Bruno P. Kinoshita commented on IMAGING-130:
--------------------------------------------

Quickly running through JHove, I get the following exception as well.

{noformat}
> jhove -m gif-hul  o23L9.gif 
java.lang.NegativeArraySizeException
	at edu.harvard.hul.ois.jhove.module.GifModule.readXMP(GifModule.java:899)
	at edu.harvard.hul.ois.jhove.module.GifModule.readAppExtension(GifModule.java:662)
	at edu.harvard.hul.ois.jhove.module.GifModule.readExtBlock(GifModule.java:528)
	at edu.harvard.hul.ois.jhove.module.GifModule.readBlock(GifModule.java:499)
	at edu.harvard.hul.ois.jhove.module.GifModule.parse(GifModule.java:300)
	at edu.harvard.hul.ois.jhove.JhoveBase.processFile(JhoveBase.java:840)
	at edu.harvard.hul.ois.jhove.JhoveBase.process(JhoveBase.java:598)
	at edu.harvard.hul.ois.jhove.JhoveBase.dispatch(JhoveBase.java:465)
	at Jhove.main(Jhove.java:296)
{noformat}

> Reading of some GIF images throws java.io.IOException: AddStringToTable: codes: 4096
code_size: 12
> --------------------------------------------------------------------------------------------------
>
>                 Key: IMAGING-130
>                 URL: https://issues.apache.org/jira/browse/IMAGING-130
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: GIF
>    Affects Versions: 1.0
>         Environment: Oracle JRE 1.7.0_45 on Windows 7
> Oracle JRE 1.7.0_55-b13 on Debian 7.5
>            Reporter: Dhyan Blum
>             Fix For: Patch Needed
>
>
> Hi guys,
> for some GIF images Imaging.getBufferedImage(byte[] bytes) throws the following exception:
> {quote}
> java.io.IOException: AddStringToTable: codes: 4096 code_size: 12
> 	at org.apache.commons.imaging.common.mylzw.MyLzwDecompressor.addStringToTable(MyLzwDecompressor.java:112)
> 	at org.apache.commons.imaging.common.mylzw.MyLzwDecompressor.decompress(MyLzwDecompressor.java:168)
> 	at org.apache.commons.imaging.formats.gif.GifImageParser.readImageDescriptor(GifImageParser.java:388)
> 	at org.apache.commons.imaging.formats.gif.GifImageParser.readBlocks(GifImageParser.java:251)
> 	at org.apache.commons.imaging.formats.gif.GifImageParser.readFile(GifImageParser.java:455)
> 	at org.apache.commons.imaging.formats.gif.GifImageParser.readFile(GifImageParser.java:435)
> 	at org.apache.commons.imaging.formats.gif.GifImageParser.getBufferedImage(GifImageParser.java:646)
> 	at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1378)
> 	at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1292)
> {quote}
> I have the same problem when using ImageIO.read(). In my post on Stackoverflow ( http://stackoverflow.com/questions/22259714/arrayindexoutofboundsexception-4096-while-reading-gif-file
) you will find an example image to reproduce the exception and a similar looking JDK bug
report that I found using Google. Quote from the bug report:
> {quote}
> A DESCRIPTION OF THE PROBLEM :
> according to specification
> http://www.w3.org/Graphics/GIF/spec-gif89a.txt
> > There is not a requirement to send a clear code when the string table is full.
> However, GIFImageReader requires the clear code when the string table is full.
> GIFImageReader violates the specification, clearly.
> In the real world, sometimes people finds such high compressed gif image.
> so you should fix this bug.
> {quote}
> I hope you will find this information helpful.
> Kind regards
> Dhyan



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message