X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UnixPkg%2FFvbServicesRuntimeDxe%2FFWBlockService.c;h=b49a660eabf8dfdc6933ec9367c52d0380427bc8;hp=c3e4df2f82fb2543582ffa1c4071ff7bc3887e3d;hb=3bbe68a3627e7c75474955352f27b923c5831ad7;hpb=f9b8ab563212511e9b46d5e73f9544f9b17d2fea diff --git a/UnixPkg/FvbServicesRuntimeDxe/FWBlockService.c b/UnixPkg/FvbServicesRuntimeDxe/FWBlockService.c index c3e4df2f82..b49a660eab 100644 --- a/UnixPkg/FvbServicesRuntimeDxe/FWBlockService.c +++ b/UnixPkg/FvbServicesRuntimeDxe/FWBlockService.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -918,14 +918,10 @@ Returns: // // Check input parameters // - if (NumOfLba == 0) { + if (NumOfLba == 0 || (StartingLba + NumOfLba) > NumOfBlocks) { VA_END (args); return EFI_INVALID_PARAMETER; } - - if ((StartingLba + NumOfLba) > NumOfBlocks) { - return EFI_INVALID_PARAMETER; - } } while (1); VA_END (args);