8232052: use string literal for format string when handling PauseAtStartupFile
authormbaesken
Wed, 09 Oct 2019 14:07:44 +0200
changeset 58548 430b9a492a05
parent 58547 7d6ba925590f
child 58549 9d9317fad3fe
8232052: use string literal for format string when handling PauseAtStartupFile Reviewed-by: clanger, stuefe
src/hotspot/os/aix/os_aix.cpp
src/hotspot/os/bsd/os_bsd.cpp
src/hotspot/os/solaris/os_solaris.cpp
src/hotspot/os/windows/os_windows.cpp
--- 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());
   }