8232052: use string literal for format string when handling PauseAtStartupFile
Reviewed-by: clanger, stuefe
--- a/src/hotspot/os/aix/os_aix.cpp Thu Oct 10 08:46:07 2019 +0200
+++ b/src/hotspot/os/aix/os_aix.cpp Wed Oct 09 14:07:44 2019 +0200
@@ -4010,7 +4010,7 @@
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());
}
--- a/src/hotspot/os/bsd/os_bsd.cpp Thu Oct 10 08:46:07 2019 +0200
+++ b/src/hotspot/os/bsd/os_bsd.cpp Wed Oct 09 14:07:44 2019 +0200
@@ -3671,7 +3671,7 @@
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());
}
--- a/src/hotspot/os/solaris/os_solaris.cpp Thu Oct 10 08:46:07 2019 +0200
+++ b/src/hotspot/os/solaris/os_solaris.cpp Wed Oct 09 14:07:44 2019 +0200
@@ -4428,7 +4428,7 @@
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());
}
--- a/src/hotspot/os/windows/os_windows.cpp Thu Oct 10 08:46:07 2019 +0200
+++ b/src/hotspot/os/windows/os_windows.cpp Wed Oct 09 14:07:44 2019 +0200
@@ -4975,7 +4975,7 @@
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());
}