Request for approval: Bug 100057 (original) (raw)
Request for approval: Bug 100057 - Potential stack corruption in GetJavaProperties
Xueming Shen Xueming.Shen at Sun.COM
Fri May 22 21:08:50 UTC 2009
- Previous message: Request for approval: Bug 100057 - Potential stack corruption in GetJavaProperties
- Next message: Request for approval: Bug 100057 - Potential stack corruption in GetJavaProperties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Andrew Haley wrote:
}
if (mapLookup(localealiases, temp, &p)) { - strcpy(temp, p); + temp = realloc(temp, strlen(p)+1); + if (temp == NULL) { + JNUThrowOutOfMemoryError(env, NULL); + return NULL; + } + strcpy(temp, p);
The max length string comes back from mapLookup(locale_aliases...) is known (in locale_str.h) , so if we can give temp a minimum size when malloc, for example 64:-) then we might not need to update the code above
Sherman
- Previous message: Request for approval: Bug 100057 - Potential stack corruption in GetJavaProperties
- Next message: Request for approval: Bug 100057 - Potential stack corruption in GetJavaProperties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]