diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c index 23db54553f..aeffc89b19 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c @@ -436,6 +436,7 @@ CascadeProcessVariables ( StrnCatGrow(&FoundVarName, &NameSize, PrevName, 0); } else { FoundVarName = AllocateZeroPool(sizeof(CHAR16)); + NameSize = sizeof(CHAR16); } Status = gRT->GetNextVariableName (&NameSize, FoundVarName, &FoundVarGuid);