diff options
Diffstat (limited to 'PerformancePkg')
-rw-r--r-- | PerformancePkg/Dp_App/DpUtilities.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/PerformancePkg/Dp_App/DpUtilities.c b/PerformancePkg/Dp_App/DpUtilities.c index 38d7aa37f1..ec5a524475 100644 --- a/PerformancePkg/Dp_App/DpUtilities.c +++ b/PerformancePkg/Dp_App/DpUtilities.c @@ -290,10 +290,11 @@ GetNameFromHandle ( );
SafeFreePool (BestLanguage);
if (!EFI_ERROR (Status)) {
- StrCpyS (
+ StrnCpyS (
mGaugeString,
DP_GAUGE_STRING_LENGTH + 1,
- StringPtr
+ StringPtr,
+ DP_GAUGE_STRING_LENGTH
);
return;
}
@@ -337,10 +338,11 @@ GetNameFromHandle ( //
// Method 3. Get the name string from FFS UI section
//
- StrCpyS (
+ StrnCpyS (
mGaugeString,
DP_GAUGE_STRING_LENGTH + 1,
- NameString
+ NameString,
+ DP_GAUGE_STRING_LENGTH
);
FreePool (NameString);
} else {
@@ -356,10 +358,11 @@ GetNameFromHandle ( //
NameString = ConvertDevicePathToText (LoadedImageDevicePath, TRUE, FALSE);
if (NameString != NULL) {
- StrCpyS (
+ StrnCpyS (
mGaugeString,
DP_GAUGE_STRING_LENGTH + 1,
- NameString
+ NameString,
+ DP_GAUGE_STRING_LENGTH
);
FreePool (NameString);
return;
|