8224033: os::snprintf should be used in virtualizationSupport.cpp
authorshade
Thu, 16 May 2019 21:32:24 +0200
changeset 54910 361bd0fb9390
parent 54909 c107322c28b0
child 54911 c5bb50505a65
8224033: os::snprintf should be used in virtualizationSupport.cpp Reviewed-by: mbaesken, stuefe
src/hotspot/share/utilities/virtualizationSupport.cpp
--- a/src/hotspot/share/utilities/virtualizationSupport.cpp	Thu May 16 12:36:08 2019 -0700
+++ b/src/hotspot/share/utilities/virtualizationSupport.cpp	Thu May 16 21:32:24 2019 +0200
@@ -65,13 +65,13 @@
     VMGuestLibError sg_error = GuestLib_StatGet("text", "resources", &result_info, &result_size);
     if (sg_error == VMGUESTLIB_ERROR_SUCCESS) {
       has_resource_information = true;
-      snprintf(extended_resource_info_at_startup, sizeof(extended_resource_info_at_startup), "%s", result_info);
+      os::snprintf(extended_resource_info_at_startup, sizeof(extended_resource_info_at_startup), "%s", result_info);
       GuestLib_StatFree(result_info, result_size);
     }
     sg_error = GuestLib_StatGet("text", "host", &result_info, &result_size);
     if (sg_error == VMGUESTLIB_ERROR_SUCCESS) {
       has_host_information = true;
-      snprintf(host_information, sizeof(host_information), "%s", result_info);
+      os::snprintf(host_information, sizeof(host_information), "%s", result_info);
       GuestLib_StatFree(result_info, result_size);
     }
   }