]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/FvbServicesRuntimeDxe/FWBlockService.c
Add Missing invocations to VA_END() for VA_START().
[mirror_edk2.git] / UnixPkg / FvbServicesRuntimeDxe / FWBlockService.c
index c316d7c2ac84591952ffd458aea04fc2598f2cde..b49a660eabf8dfdc6933ec9367c52d0380427bc8 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -918,14 +918,10 @@ Returns:
     //\r
     // Check input parameters\r
     //\r
-    if (NumOfLba == 0) {\r
+    if (NumOfLba == 0 || (StartingLba + NumOfLba) > NumOfBlocks) {\r
       VA_END (args);\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-\r
-    if ((StartingLba + NumOfLba) > NumOfBlocks) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
   } while (1);\r
 \r
   VA_END (args);\r