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

Inet[4|6]Address native initializing code should check field/MethodID values

    XMLWordPrintable

Details

    • b117
    • Not verified

    Backports

      Description



        There are no checks for NULLs. e.g.

        static void initializeInetClasses(JNIEnv *env)
        {
            static int initialized = 0;
            if (!initialized) {
                ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
                ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
                ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
                ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
                ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
                initialized = 1;
            }
        }

        Attachments

          Issue Links

            Activity

              People

                chegar Chris Hegarty
                chegar Chris Hegarty
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: