diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-21 13:23:33 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-21 13:23:33 +0000 |
commit | 53308a3e78cf12d1a858cb57cb58bec46b80677f (patch) | |
tree | 31f15639450f66ae2a38f7f221aa5f7bd83c5498 | |
parent | 83d9b9c43edb69cc782315032356dc2ce6785c75 (diff) | |
download | edk2-53308a3e78cf12d1a858cb57cb58bec46b80677f.zip edk2-53308a3e78cf12d1a858cb57cb58bec46b80677f.tar.gz edk2-53308a3e78cf12d1a858cb57cb58bec46b80677f.tar.bz2 |
UEFI Hii: Fix the bug based on the real root cause.svn/branches/UefiHiiEnable4354
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UefiHiiEnable4354@4595 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c index de84d74..4448be1 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c @@ -341,7 +341,7 @@ InitializeRequestElement ( if ((Question->Operand == EFI_IFR_PASSWORD_OP) && (Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK)) { // // Password with CALLBACK flag is stored in encoded format, - // so don't need to append it to <ConfigRequest>\ + // so don't need to append it to <ConfigRequest> // return EFI_SUCCESS; } @@ -354,13 +354,13 @@ InitializeRequestElement ( // Old String buffer is not sufficient for RequestElement, allocate a new one // StringSize = (Storage->ConfigRequest != NULL) ? StrSize (Storage->ConfigRequest) : 0; - NewStr = AllocateZeroPool ((StringSize + CONFIG_REQUEST_STRING_INCREMENTAL + 1) * sizeof (CHAR16)); + NewStr = AllocateZeroPool (StringSize + CONFIG_REQUEST_STRING_INCREMENTAL * sizeof (CHAR16)); if (Storage->ConfigRequest != NULL) { - StrCpy (NewStr, Storage->ConfigRequest); + CopyMem (NewStr, Storage->ConfigRequest, StringSize); gBS->FreePool (Storage->ConfigRequest); } Storage->ConfigRequest = NewStr; - Storage->SpareStrLen += CONFIG_REQUEST_STRING_INCREMENTAL; + Storage->SpareStrLen = CONFIG_REQUEST_STRING_INCREMENTAL; } StrCat (Storage->ConfigRequest, RequestElement); |