Blame SOURCES/rh2021263-fips_missing_native_returns.patch

ba2829
commit 1b5bd349bdfa7b9627ea58d819bc250a55112de2
ba2829
Author: Fridrich Strba <fstrba@suse.com>
ba2829
Date:   Mon Jan 17 19:44:03 2022 +0000
ba2829
ba2829
    RH2021263: Return in C code after having generated Java exception
ba2829
ba2829
diff --git openjdk.orig/src/java.base/linux/native/libsystemconf/systemconf.c openjdk/src/java.base/linux/native/libsystemconf/systemconf.c
ba2829
index 6f4656bfcb6..34d0ff0ce91 100644
ba2829
--- openjdk.orig/src/java.base/linux/native/libsystemconf/systemconf.c
ba2829
+++ openjdk/src/java.base/linux/native/libsystemconf/systemconf.c
ba2829
@@ -131,11 +131,13 @@ JNIEXPORT jboolean JNICALL Java_java_security_SystemConfigurator_getSystemFIPSEn
ba2829
     dbgPrint(env, "getSystemFIPSEnabled: reading " FIPS_ENABLED_PATH);
ba2829
     if ((fe = fopen(FIPS_ENABLED_PATH, "r")) == NULL) {
ba2829
         throwIOException(env, "Cannot open " FIPS_ENABLED_PATH);
ba2829
+        return JNI_FALSE;
ba2829
     }
ba2829
     fips_enabled = fgetc(fe);
ba2829
     fclose(fe);
ba2829
     if (fips_enabled == EOF) {
ba2829
         throwIOException(env, "Cannot read " FIPS_ENABLED_PATH);
ba2829
+        return JNI_FALSE;
ba2829
     }
ba2829
     msg_bytes = snprintf(msg, MSG_MAX_SIZE, "getSystemFIPSEnabled:" \
ba2829
             " read character is '%c'", fips_enabled);