mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
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
This commit is contained in:
parent
404d4e5c60
commit
c7b616cf09
@ -353,7 +353,7 @@ InitializeRequestElement (
|
|||||||
//
|
//
|
||||||
// Old String buffer is not sufficient for RequestElement, allocate a new one
|
// 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));
|
NewStr = AllocateZeroPool (StringSize + CONFIG_REQUEST_STRING_INCREMENTAL * sizeof (CHAR16));
|
||||||
if (Storage->ConfigRequest != NULL) {
|
if (Storage->ConfigRequest != NULL) {
|
||||||
CopyMem (NewStr, Storage->ConfigRequest, StringSize);
|
CopyMem (NewStr, Storage->ConfigRequest, StringSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user