From b80022da3b54bda5de3da298a56a7ec0e5873384 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Fri, 4 Mar 2011 16:22:15 +0000 Subject: 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 --- Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c | 4 ++-- 1 file 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)); -- cgit v1.1