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

awt_image_GifImageDecoder_parseImage() "interlace" param has the wrong type

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 12, 13
    • Fix Version/s: 13
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b15

      Description

      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)
      {

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: