Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6532025

GIF reader throws misleading exception with truncated images

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        GIF image reader throws misleading exception if image in question is truncated:

        java.lang.IndexOutOfBoundsException: off < 0 || len < 0 || off+len > b.length || off+len < 0!
                at javax.imageio.stream.FileCacheImageInputStream.read(FileCacheImageInputStream.java:151)
                at com.sun.imageio.plugins.gif.GIFImageReader.getCode(GIFImageReader.java:306)
                at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:881)
                at javax.imageio.ImageIO.read(ImageIO.java:1422)
                at javax.imageio.ImageIO.read(ImageIO.java:1326)
                at imagedemo.Main.main(Main.java:23)

        Also the problem is the same in 1.5.0_07 and in 6.0u1-b03.

        Examples to truncated images are attached.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jdv Jayathirth D V
                  Reporter:
                  bae Andrew Brygin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: