diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-18 06:00:48 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-18 06:00:48 +0000 |
commit | 9d7e705f41fcf6620f1efe59391d148ccf6c7283 (patch) | |
tree | 489e65e3b510846ba6023901152343d970d0481b | |
parent | dcad00809666ed59a995388d5935cacb4fe2c196 (diff) | |
download | edk2-9d7e705f41fcf6620f1efe59391d148ccf6c7283.zip edk2-9d7e705f41fcf6620f1efe59391d148ccf6c7283.tar.gz edk2-9d7e705f41fcf6620f1efe59391d148ccf6c7283.tar.bz2 |
UEFI HII: Fix a bug.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UefiHiiEnable4354@4575 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/UefiSetupBrowserDxe/IfrParse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/UefiSetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/UefiSetupBrowserDxe/IfrParse.c index 6a096a9..de84d74 100644 --- a/MdeModulePkg/Universal/UefiSetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/UefiSetupBrowserDxe/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,9 +354,9 @@ 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 * sizeof (CHAR16))); + NewStr = AllocateZeroPool ((StringSize + CONFIG_REQUEST_STRING_INCREMENTAL + 1) * sizeof (CHAR16)); if (Storage->ConfigRequest != NULL) { - CopyMem (NewStr, Storage->ConfigRequest, StringSize); + StrCpy (NewStr, Storage->ConfigRequest); gBS->FreePool (Storage->ConfigRequest); } Storage->ConfigRequest = NewStr; |