mirror of https://github.com/acidanthera/audk.git
Correct incoming buffer size comparison to the incoming buffer, not the existing buffer.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11344 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
17a6c337d2
commit
b80022da3b
|
@ -2350,12 +2350,12 @@ Returns:
|
|||
// Set file system information.
|
||||
//
|
||||
if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid)) {
|
||||
if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (PrivateRoot->VolumeLabel)) {
|
||||
NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;
|
||||
if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (NewFileSystemInfo->VolumeLabel)) {
|
||||
Status = EFI_BAD_BUFFER_SIZE;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;
|
||||
|
||||
FreePool (PrivateRoot->VolumeLabel);
|
||||
PrivateRoot->VolumeLabel = AllocatePool (StrSize (NewFileSystemInfo->VolumeLabel));
|
||||
|
|
Loading…
Reference in New Issue