mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8073773: Presume path preparedness
Reviewed-by: darcy, dholmes, ahgross
This commit is contained in:
parent
5f7a2dfec6
commit
8c4275fcb7
3 changed files with 24 additions and 5 deletions
|
@ -323,7 +323,11 @@ GetJREPath(char *path, jint pathsize)
|
|||
JLI_TraceLauncher("JRE path is %s\n", path);
|
||||
return JNI_TRUE;
|
||||
}
|
||||
|
||||
/* ensure storage for path + \jre + NULL */
|
||||
if ((JLI_StrLen(path) + 4 + 1) > (size_t) pathsize) {
|
||||
JLI_TraceLauncher("Insufficient space to store JRE path\n");
|
||||
return JNI_FALSE;
|
||||
}
|
||||
/* Does this app ship a private JRE in <apphome>\jre directory? */
|
||||
JLI_Snprintf(javadll, sizeof (javadll), "%s\\jre\\bin\\" JAVA_DLL, path);
|
||||
if (stat(javadll, &s) == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue