filter flags argument to JVM_Open

The class library may pass non-standard flags to JVM_Open which will
confuse the OS if we pass them through, so we must filter them out.
This commit is contained in:
Joel Dice 2013-05-13 13:11:12 -06:00
parent 6d5fbdeb7b
commit 7e2d265fb9

View File

@ -5049,7 +5049,7 @@ EXPORT(JVM_NativePath)(char* path)
extern "C" JNIEXPORT jint JNICALL
EXPORT(JVM_Open)(const char* path, jint flags, jint mode)
{
int r = OPEN(path, flags, mode);
int r = OPEN(path, flags & 0xFFFF, mode);
if (r == -1) {
return errno == EEXIST ? JVM_EEXIST : -1;
} else {