diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-04 16:22:15 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-04 16:22:15 +0000 |
commit | b80022da3b54bda5de3da298a56a7ec0e5873384 (patch) | |
tree | bfa7a181ac0be0b008d429fe4e6ffedb956bf594 | |
parent | 17a6c337d2a5fefd42feb83049e7dfa1b852822c (diff) | |
download | edk2-b80022da3b54bda5de3da298a56a7ec0e5873384.zip edk2-b80022da3b54bda5de3da298a56a7ec0e5873384.tar.gz edk2-b80022da3b54bda5de3da298a56a7ec0e5873384.tar.bz2 |
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
-rw-r--r-- | Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c index f248ccb..ef9fa86 100644 --- a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c +++ b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c @@ -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));
|