Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
8232052: use string literal for format string when handling PauseAtSt…
Browse files Browse the repository at this point in the history
…artupFile

Reviewed-by: clanger, stuefe
  • Loading branch information
MBaesken committed Oct 9, 2019
1 parent 124bc7b commit 19a6085
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/os/aix/os_aix.cpp
Expand Up @@ -4010,7 +4010,7 @@ int os::loadavg(double values[], int nelem) {
void os::pause() {
char filename[MAX_PATH];
if (PauseAtStartupFile && PauseAtStartupFile[0]) {
jio_snprintf(filename, MAX_PATH, PauseAtStartupFile);
jio_snprintf(filename, MAX_PATH, "%s", PauseAtStartupFile);
} else {
jio_snprintf(filename, MAX_PATH, "./vm.paused.%d", current_process_id());
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/os/bsd/os_bsd.cpp
Expand Up @@ -3671,7 +3671,7 @@ int os::loadavg(double loadavg[], int nelem) {
void os::pause() {
char filename[MAX_PATH];
if (PauseAtStartupFile && PauseAtStartupFile[0]) {
jio_snprintf(filename, MAX_PATH, PauseAtStartupFile);
jio_snprintf(filename, MAX_PATH, "%s", PauseAtStartupFile);
} else {
jio_snprintf(filename, MAX_PATH, "./vm.paused.%d", current_process_id());
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/os/solaris/os_solaris.cpp
Expand Up @@ -4428,7 +4428,7 @@ bool os::pd_unmap_memory(char* addr, size_t bytes) {
void os::pause() {
char filename[MAX_PATH];
if (PauseAtStartupFile && PauseAtStartupFile[0]) {
jio_snprintf(filename, MAX_PATH, PauseAtStartupFile);
jio_snprintf(filename, MAX_PATH, "%s", PauseAtStartupFile);
} else {
jio_snprintf(filename, MAX_PATH, "./vm.paused.%d", current_process_id());
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/os/windows/os_windows.cpp
Expand Up @@ -4975,7 +4975,7 @@ bool os::pd_unmap_memory(char* addr, size_t bytes) {
void os::pause() {
char filename[MAX_PATH];
if (PauseAtStartupFile && PauseAtStartupFile[0]) {
jio_snprintf(filename, MAX_PATH, PauseAtStartupFile);
jio_snprintf(filename, MAX_PATH, "%s", PauseAtStartupFile);
} else {
jio_snprintf(filename, MAX_PATH, "./vm.paused.%d", current_process_id());
}
Expand Down

0 comments on commit 19a6085

Please sign in to comment.