Mercurial > hg > release > icedtea7-forest-2.4 > jdk
changeset 7339:68c6f18ee89d
8037046: Validate libraries to be loaded
Reviewed-by: ksrini, ahgross
author | kizune |
---|---|
date | Tue, 25 Mar 2014 11:28:26 -0700 |
parents | cd050a24fc72 |
children | ede97ca55490 |
files | src/windows/bin/java_md.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/windows/bin/java_md.c Thu Mar 27 17:28:32 2014 +0000 +++ b/src/windows/bin/java_md.c Tue Mar 25 11:28:26 2014 -0700 @@ -1301,6 +1301,14 @@ /* 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();