Bug: https://bugs.openjdk.java.net/browse/JDK-8238842 Webrev: http://cr.openjdk.java.net/~prr/8238842/
The string table has a maximum size of 4096 - by GIF spec as well as in the implementation The value initCodeSize (as a power of 2) to initialise the string table, and since GIF
only allows 8bpp, this ought to max out at 256. But there's no check so we can get an ArrayIndexOutOfBoundsException This is now checked for. Also I removed a printStackTrace which briefly confused me during debugging as I had no idea where the message was coming from. See the bug for more details. -phil