8037046: Validate libraries to be loaded

Reviewed-by: ksrini, ahgross
This commit is contained in:
Alexander Zuev 2014-03-22 02:21:11 +04:00
parent 33ccc261e0
commit 9157f3845d

View File

@ -1306,6 +1306,14 @@ int AWTPreload(const char *funcName)
/* save path length */
jrePathLen = JLI_StrLen(libraryPath);
if (jrePathLen + JLI_StrLen("\\bin\\verify.dll") >= MAXPATHLEN) {
/* jre path is too long, the library path will not fit there;
* report and abort preloading
*/
JLI_ReportErrorMessage(JRE_ERROR11);
break;
}
/* load msvcrt 1st */
LoadMSVCRT();