diff options
Diffstat (limited to 'EdkModulePkg/Library/EdkIfrSupportLib/IfrVariable.c')
-rw-r--r-- | EdkModulePkg/Library/EdkIfrSupportLib/IfrVariable.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/EdkModulePkg/Library/EdkIfrSupportLib/IfrVariable.c b/EdkModulePkg/Library/EdkIfrSupportLib/IfrVariable.c index 3e37553668..a4aab0ff01 100644 --- a/EdkModulePkg/Library/EdkIfrSupportLib/IfrVariable.c +++ b/EdkModulePkg/Library/EdkIfrSupportLib/IfrVariable.c @@ -467,11 +467,15 @@ Returns: {
EFI_STATUS Status;
CHAR16 *NameSuffixed;
+ UINTN NameLength;
+ UINTN SuffixLength;
//
// enough to concatenate both strings.
//
- NameSuffixed = AllocateZeroPool ((StrLen (Name) + StrLen (Suffix) + 1) * sizeof (CHAR16));
+ NameLength = StrLen (Name);
+ SuffixLength = StrLen (Suffix);
+ NameSuffixed = AllocateZeroPool ((NameLength + SuffixLength + 1) * sizeof (CHAR16));
StrCpy (NameSuffixed, Name);
StrCat (NameSuffixed, Suffix);
|