Skip to content

Commit 4f9c891

Browse files
fridrichgnu-andrew
authored andcommitted
RH2021263: Return in C code after having generated Java exception
1 parent 8e0ea91 commit 4f9c891

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/java.base/linux/native/libsystemconf/systemconf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ JNIEXPORT jboolean JNICALL Java_java_security_SystemConfigurator_getSystemFIPSEn
131131
dbgPrint(env, "getSystemFIPSEnabled: reading " FIPS_ENABLED_PATH);
132132
if ((fe = fopen(FIPS_ENABLED_PATH, "r")) == NULL) {
133133
throwIOException(env, "Cannot open " FIPS_ENABLED_PATH);
134+
return JNI_FALSE;
134135
}
135136
fips_enabled = fgetc(fe);
136137
fclose(fe);
137138
if (fips_enabled == EOF) {
138139
throwIOException(env, "Cannot read " FIPS_ENABLED_PATH);
140+
return JNI_FALSE;
139141
}
140142
msg_bytes = snprintf(msg, MSG_MAX_SIZE, "getSystemFIPSEnabled:" \
141143
" read character is '%c'", fips_enabled);

0 commit comments

Comments
 (0)