mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8265757: stack-use-after-scope in perfMemory_posix.cpp get_user_name_slow()
Reviewed-by: lfoltan, dcubed
This commit is contained in:
parent
e4be9680cb
commit
879a77f173
@ -527,6 +527,7 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
|
||||
// directory search
|
||||
char* oldest_user = NULL;
|
||||
time_t oldest_ctime = 0;
|
||||
char buffer[MAXPATHLEN + 1];
|
||||
int searchpid;
|
||||
char* tmpdirname = (char *)os::get_temp_directory();
|
||||
#if defined(LINUX)
|
||||
@ -537,7 +538,6 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
|
||||
if (nspid == -1) {
|
||||
searchpid = vmid;
|
||||
} else {
|
||||
char buffer[MAXPATHLEN + 1];
|
||||
jio_snprintf(buffer, MAXPATHLEN, "/proc/%d/root%s", vmid, tmpdirname);
|
||||
tmpdirname = buffer;
|
||||
searchpid = nspid;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user