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

awt_image_GifImageDecoder_parseImage() "interlace" param has the wrong type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • 11, 12, 13
    • client-libs
    • b15

      There is a missmatch between the Java definition and the native JNI implementation for the "interlace" parameter of the awt_image_GifImageDecoder_parseImage() method:

      src/java.desktop/share/classes/sun/awt/image/GifImageDecoder.java

          private native boolean parseImage(
                                            int x, int y,
                                            int width, int height,
                                            boolean interlace, <-------- the boolean type in java code
                                            int initCodeSize,
                                            byte block[], byte rasline[],
                                            IndexColorModel model);

      src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c

      JNIEXPORT jboolean JNICALL
      Java_sun_awt_image_GifImageDecoder_parseImage(JNIEnv *env, jobject this,
                                                    jint relx, jint rely,
                                                    jint width, jint height,
                                                    jint interlace, <--- wrongly cast to the int type in the native code
                                                    jint initCodeSize,
                                                    jbyteArray blockh,
                                                    jbyteArray raslineh,
                                                    jobject cmh)
      {

            aleonard Andrew Leonard
            aleonard Andrew Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: