(SIGAR-201) JNIEnv->ExceptionCheck to avoid possible SEGV on OutOfMemoryError

This commit is contained in:
Doug MacEachern committed 2010-04-15 10:55:09 -07:00
1 parent 6c1f0a9871
commit c46af75d74
7 files changed
+103 -15

No files matched your search

+4 -1
View File
@@ -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;
}
}