summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-04 16:22:15 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-04 16:22:15 +0000
commitb80022da3b54bda5de3da298a56a7ec0e5873384 (patch)
treebfa7a181ac0be0b008d429fe4e6ffedb956bf594
parent17a6c337d2a5fefd42feb83049e7dfa1b852822c (diff)
downloadedk2-platforms-b80022da3b54bda5de3da298a56a7ec0e5873384.tar.xz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c
index f248ccb933..ef9fa8673c 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));