8224033: os::snprintf should be used in virtualizationSupport.cpp
Reviewed-by: mbaesken, stuefe
--- 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);
}
}