Reviewed-by: Liming Gao <liming....@intel.com> > -----Original Message----- > From: Bi, Dandan > Sent: Tuesday, April 12, 2016 6:44 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming; Dong, Eric > Subject: [patch] MdeModulePkg/HiiDatabaseDxe: Correct the ReallocatePool > size > > Cc: Liming Gao <liming....@intel.com> > Cc: Eric Dong <eric.d...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi <dandan...@intel.com> > --- > MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > index 3a871cf..4ed4ecc 100644 > --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > @@ -598,15 +598,15 @@ MergeDefaultString ( > // Append the found default value string to the input AltCfgResp > // > 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, > (VOID *) (*AltCfgResp) > ); > @@ -617,10 +617,11 @@ MergeDefaultString ( > StrCatS (*AltCfgResp, TotalSize / sizeof (CHAR16), StringPtrDefault); > break; > } else { > TempChar = *StringPtrEnd; > *StringPtrEnd = L'\0'; > + TotalSize = SizeAltCfgResp + StrSize (StringPtrDefault); > *AltCfgResp = (EFI_STRING) ReallocatePool ( > SizeAltCfgResp, > TotalSize, > (VOID *) (*AltCfgResp) > ); > -- > 1.9.5.msysgit.1
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel