diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-02-19 02:21:25 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-02-19 02:21:25 +0000 |
commit | c7b616cf0953eb1a0eede7edbf863fbb833f1a93 (patch) | |
tree | 064889fe8730d1a5526026fc3ee27d4dbbaf9021 /MdeModulePkg/Universal/SetupBrowserDxe | |
parent | 404d4e5c6070f75863d465419570b973fba5ac8a (diff) | |
download | edk2-platforms-c7b616cf0953eb1a0eede7edbf863fbb833f1a93.tar.xz |
Initialize Storage->ConfigRequest to contain at least one Unicode NULL '\0000'. CONFIG_REQUEST_STRING_INCREMENTAL is designed to only host valid string without the trailing '\0000'.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4700 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c index 4b68047156..639bc9f2bd 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c @@ -353,7 +353,7 @@ InitializeRequestElement ( // // Old String buffer is not sufficient for RequestElement, allocate a new one // - StringSize = (Storage->ConfigRequest != NULL) ? StrSize (Storage->ConfigRequest) : 0; + StringSize = (Storage->ConfigRequest != NULL) ? StrSize (Storage->ConfigRequest) : sizeof (CHAR16); NewStr = AllocateZeroPool (StringSize + CONFIG_REQUEST_STRING_INCREMENTAL * sizeof (CHAR16)); if (Storage->ConfigRequest != NULL) { CopyMem (NewStr, Storage->ConfigRequest, StringSize); |