]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Correct incoming buffer size comparison to the incoming buffer, not the existing...
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 4 Mar 2011 16:22:15 +0000 (16:22 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 4 Mar 2011 16:22:15 +0000 (16:22 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11344 6f19259b-4bc3-4df7-8a09-765794883524

Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c

index f248ccb9331f1a254829b79e333ad231b14b0553..ef9fa8673c5ceac7a30278e4537d7a6235d66b94 100644 (file)
@@ -2350,12 +2350,12 @@ Returns:
   // Set file system information.\r
   //\r
   if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid)) {\r
-    if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (PrivateRoot->VolumeLabel)) {\r
+    NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;\r
+    if (BufferSize < SIZE_OF_EFI_FILE_SYSTEM_INFO + StrSize (NewFileSystemInfo->VolumeLabel)) {\r
       Status = EFI_BAD_BUFFER_SIZE;\r
       goto Done;\r
     }\r
 \r
-    NewFileSystemInfo = (EFI_FILE_SYSTEM_INFO *) Buffer;\r
 \r
     FreePool (PrivateRoot->VolumeLabel);\r
     PrivateRoot->VolumeLabel = AllocatePool (StrSize (NewFileSystemInfo->VolumeLabel));\r