mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/HiiDatabaseDxe: Correct the ReallocatePool size
Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
622ce64508
commit
9b72af13e2
|
@ -600,11 +600,11 @@ MergeDefaultString (
|
|||
if (StringPtr == NULL) {
|
||||
StringPtrEnd = StrStr (StringPtrDefault + 1, L"&GUID");
|
||||
SizeAltCfgResp = StrSize (*AltCfgResp);
|
||||
TotalSize = SizeAltCfgResp + StrSize (StringPtrDefault);
|
||||
if (StringPtrEnd == NULL) {
|
||||
//
|
||||
// No more default string is found.
|
||||
//
|
||||
TotalSize = SizeAltCfgResp + StrSize (StringPtrDefault);
|
||||
*AltCfgResp = (EFI_STRING) ReallocatePool (
|
||||
SizeAltCfgResp,
|
||||
TotalSize,
|
||||
|
@ -619,6 +619,7 @@ MergeDefaultString (
|
|||
} else {
|
||||
TempChar = *StringPtrEnd;
|
||||
*StringPtrEnd = L'\0';
|
||||
TotalSize = SizeAltCfgResp + StrSize (StringPtrDefault);
|
||||
*AltCfgResp = (EFI_STRING) ReallocatePool (
|
||||
SizeAltCfgResp,
|
||||
TotalSize,
|
||||
|
|
Loading…
Reference in New Issue