提交 513ba78a 编写于 作者: M msheppar

8036134: Check src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c for JNI pending exceptions

Summary: check malloc return value and added JUN_ThrowOutOfMemoryException
Reviewed-by: alanb
上级 b64a0cb7
......@@ -1118,11 +1118,13 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetFullPathName0(JNIEnv *env,
JNU_ThrowInternalError(env, "GetFullPathNameW failed");
}
free(lpBuf);
} else {
JNU_ThrowOutOfMemoryError(env, "native memory allocation failure");
}
}
}
if (len == 0)
} else {
throwWindowsException(env, GetLastError());
}
return rv;
}
......@@ -1157,13 +1159,13 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetFinalPathNameByHandle(JNIEnv* env,
JNU_ThrowInternalError(env, "GetFinalPathNameByHandleW failed");
}
free(lpBuf);
} else {
JNU_ThrowOutOfMemoryError(env, "native memory allocation failure");
}
}
}
if (len == 0)
} else {
throwWindowsException(env, GetLastError());
}
return rv;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册