/** @file\r
Capsule update PEIM for UEFI2.0\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
return EFI_SUCCESS;\r
}\r
} else {\r
- UnicodeValueToString (TempVarName, 0, Index, 0);\r
+ UnicodeValueToStringS (\r
+ TempVarName,\r
+ sizeof (CapsuleVarName) - ((UINTN)TempVarName - (UINTN)CapsuleVarName),\r
+ 0,\r
+ Index,\r
+ 0\r
+ );\r
Status = PPIVariableServices->GetVariable (\r
PPIVariableServices,\r
CapsuleVarName,\r
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);\r
while (TRUE) {\r
if (Index > 0) {\r
- UnicodeValueToString (TempVarName, 0, Index, 0);\r
+ UnicodeValueToStringS (\r
+ TempVarName,\r
+ sizeof (CapsuleVarName) - ((UINTN)TempVarName - (UINTN)CapsuleVarName),\r
+ 0,\r
+ Index,\r
+ 0\r
+ );\r
}\r
Status = PPIVariableServices->GetVariable (\r
PPIVariableServices,\r