(SIGAR-201) JNIEnv->ExceptionCheck to avoid possible SEGV on OutOfMemoryError
This commit is contained in:
1 parent
6c1f0a9871
commit
c46af75d74
7 files changed
+103
-15
No files matched your search
@@ -331,7 +331,10 @@ JNIEXPORT void SIGAR_JNI(win32_RegistryKey_RegQueryMultiStringValue)
|
||||
env->NewString((const jchar *)ptr, len);
|
||||
|
||||
env->CallBooleanMethod(obj, id, jval);
|
||||
|
||||
if (env->ExceptionCheck()) {
|
||||
HeapFree(GetProcessHeap(), 0, value);
|
||||
return;
|
||||
}
|
||||
ptr += len + 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user