summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c')
-rw-r--r--MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index f500e20b32..d378c59dd9 100644
--- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -837,7 +837,7 @@ GetDeviceInfoFromHandleAndUpdateLength (
ControllerNameStringSize = FPDT_MAX_PERF_RECORD_SIZE - (*Length) - 1;
}
- UnicodeStrToAsciiStrS(StringPtr, ComponentNameString, ControllerNameStringSize);
+ UnicodeStrnToAsciiStrS(StringPtr, ControllerNameStringSize - 1, ComponentNameString, ControllerNameStringSize, &ControllerNameStringSize);
//
// Add a space in the end of the ControllerName
@@ -879,7 +879,7 @@ GetDeviceInfoFromHandleAndUpdateLength (
AsciiStringPtr = ComponentNameString;
}
- UnicodeStrToAsciiStrS(StringPtr, AsciiStringPtr, DevicePathStringSize);
+ UnicodeStrnToAsciiStrS(StringPtr, DevicePathStringSize - 1, AsciiStringPtr, DevicePathStringSize, &DevicePathStringSize);
*Length += (UINT8)DevicePathStringSize;
return EFI_SUCCESS;
}