]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add Missing invocations to VA_END() for VA_START().
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 1 Feb 2012 06:06:08 +0000 (06:06 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 1 Feb 2012 06:06:08 +0000 (06:06 +0000)
Signed-off-by: rsun3
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12979 6f19259b-4bc3-4df7-8a09-765794883524

28 files changed:
EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Handle.c
EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Print.c
EdkCompatibilityPkg/Foundation/Library/Dxe/GraphicsLite/Print.c
EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/SwitchStack.c
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePrintLib/PrintLib.c
EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c
EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Debug.c
EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/RuntimeLib.c
EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c
IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c
MdeModulePkg/Universal/SetupBrowserDxe/Print.c
MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
MdePkg/Library/BasePrintLib/PrintLib.c
MdePkg/Library/BasePrintLib/PrintLibInternal.c
MdePkg/Library/DxeExtendedSalLib/ExtendedSalLib.c
MdePkg/Library/DxeRuntimeExtendedSalLib/ExtendedSalLib.c
MdePkg/Library/UefiLib/UefiLibPrint.c
Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
Nt32Pkg/Sec/SecMain.c
OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c
PerformancePkg/Dp_App/DpUtilities.c
SecurityPkg/Tcg/TcgDxe/TisDxe.c
ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
UnixPkg/FvbServicesRuntimeDxe/FWBlockService.c

index 9cf391d408a1cd5f5521fed0998276dccf8d0521..b6484731e92e30c1054ca3d15e5219dc37bba976 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -71,6 +71,7 @@ Returns:
   AnInterface = NULL;\r
   VA_START (args, Interface);\r
   ProtocolFirst = VA_ARG (args, EFI_GUID *);\r
   AnInterface = NULL;\r
   VA_START (args, Interface);\r
   ProtocolFirst = VA_ARG (args, EFI_GUID *);\r
+  VA_END (args);\r
 \r
   //\r
   // Get list of all handles that support the first protocol.\r
 \r
   //\r
   // Get list of all handles that support the first protocol.\r
@@ -146,6 +147,8 @@ Returns:
                           );\r
         }\r
 \r
                           );\r
         }\r
 \r
+        VA_END (args);\r
+        \r
         goto lbl_out;\r
       }\r
 \r
         goto lbl_out;\r
       }\r
 \r
@@ -163,6 +166,7 @@ Returns:
       }\r
     }\r
 \r
       }\r
     }\r
 \r
+    VA_END (args);\r
   }\r
 \r
   //\r
   }\r
 \r
   //\r
index 2c8dc73ae6b6ee31efe1be662961a16a47058fe5..83939670f65e15acee04a8e5089c7a14b3765a6e 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -416,8 +416,7 @@ Returns:
   EFI_SIMPLE_TEXT_OUT_PROTOCOL  *Sto;\r
   EFI_STATUS                    Status;\r
   VA_LIST                       Args;\r
   EFI_SIMPLE_TEXT_OUT_PROTOCOL  *Sto;\r
   EFI_STATUS                    Status;\r
   VA_LIST                       Args;\r
-\r
-  VA_START (Args, Fmt);\r
+  UINTN                         LengthOfPrinted;\r
 \r
   Handle = gST->ConsoleOutHandle;\r
 \r
 \r
   Handle = gST->ConsoleOutHandle;\r
 \r
@@ -454,7 +453,10 @@ Returns:
     return 0;\r
   }\r
 \r
     return 0;\r
   }\r
 \r
-  return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);\r
+  VA_START (Args, Fmt);\r
+  LengthOfPrinted = _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);\r
+  VA_END (Args);\r
+  return LengthOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
index 0988cc2f30bab7421a99fc2c7f45413cf7162720..1492e53d681b818e8d58ad3dd39ef72731b0ee50 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -390,8 +390,7 @@ Returns:
   EFI_SIMPLE_TEXT_OUT_PROTOCOL  *Sto;\r
   EFI_STATUS                    Status;\r
   VA_LIST                       Args;\r
   EFI_SIMPLE_TEXT_OUT_PROTOCOL  *Sto;\r
   EFI_STATUS                    Status;\r
   VA_LIST                       Args;\r
-\r
-  VA_START (Args, Fmt);\r
+  UINTN                         LengthOfPrinted;\r
 \r
   Handle = gST->ConsoleOutHandle;\r
 \r
 \r
   Handle = gST->ConsoleOutHandle;\r
 \r
@@ -428,7 +427,10 @@ Returns:
     return 0;\r
   }\r
 \r
     return 0;\r
   }\r
 \r
-  return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);\r
+  VA_START (Args, Fmt);\r
+  LengthOfPrinted = _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);\r
+  VA_END (Args);\r
+  return LengthOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
index b0c9a7f1f23b4d1eea67172bc4708e62d0855abf..1452ef003504b33e6126d717ebc6846b1508466a 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 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
 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
@@ -508,6 +508,7 @@ Returns:
     StackString = VA_ARG (Marker, CHAR16 *);\r
 \r
     if (StackString == NULL) {\r
     StackString = VA_ARG (Marker, CHAR16 *);\r
 \r
     if (StackString == NULL) {\r
+      VA_END (Marker);\r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
@@ -517,6 +518,7 @@ Returns:
       LargestString = StringLen;\r
     }\r
   }\r
       LargestString = StringLen;\r
     }\r
   }\r
+  VA_END (Marker);\r
 \r
   if ((LargestString + 2) > DimensionsWidth) {\r
     LargestString = DimensionsWidth - 2;\r
 \r
   if ((LargestString + 2) > DimensionsWidth) {\r
     LargestString = DimensionsWidth - 2;\r
@@ -682,6 +684,7 @@ ExtractDefault(
       BufferPos += Width;\r
 \r
       if ((UINTN)(Offset + Width) > *BufferSize) {\r
       BufferPos += Width;\r
 \r
       if ((UINTN)(Offset + Width) > *BufferSize) {\r
+        VA_END (Args);\r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
 \r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
 \r
@@ -1025,6 +1028,7 @@ ConstructConfigAltResp (
     BufToHexString (StringPtr + 8, &StrBufferLen, (UINT8 *) &AltCfgId, sizeof (UINT16));\r
     Status = ExtractBlockConfig (DefaultValueArray, &AltCfg[Index]);\r
     if (EFI_ERROR (Status)) {\r
     BufToHexString (StringPtr + 8, &StrBufferLen, (UINT8 *) &AltCfgId, sizeof (UINT16));\r
     Status = ExtractBlockConfig (DefaultValueArray, &AltCfg[Index]);\r
     if (EFI_ERROR (Status)) {\r
+      VA_END (Args);\r
       return Status;\r
     }\r
     AltRespLen += EfiStrLen (AltCfg[Index]);\r
       return Status;\r
     }\r
     AltRespLen += EfiStrLen (AltCfg[Index]);\r
index 92b7cba0c62a90b0804d13d2368e428e60102876..d9b75489069fba01f13a97575cd84e17408712b7 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -65,6 +65,7 @@ SwitchStack (
 \r
   InternalSwitchStack (EntryPoint, Context1, Context2, NewStack, Marker);\r
 \r
 \r
   InternalSwitchStack (EntryPoint, Context1, Context2, NewStack, Marker);\r
 \r
+  VA_END (Marker);\r
   //\r
   // InternalSwitchStack () will never return\r
   //\r
   //\r
   // InternalSwitchStack () will never return\r
   //\r
index ecb55ebb2fdf9ed451155d5a2fd5d0b6e1aa4e44..3258b016b557b809c5d013dc2e7b84a79fcd4190 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -601,9 +601,12 @@ BasePrintLibSPrint (
   )\r
 {\r
   VA_LIST  Marker;\r
   )\r
 {\r
   VA_LIST  Marker;\r
+  UINTN    NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return BasePrintLibVSPrint (StartOfBuffer, BufferSize, Flags, FormatString, Marker);\r
+  NumberOfPrinted = BasePrintLibVSPrint (StartOfBuffer, BufferSize, Flags, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -696,9 +699,12 @@ UnicodeSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -789,9 +795,12 @@ UnicodeSPrintAsciiFormat (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -933,9 +942,12 @@ AsciiSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -1026,9 +1038,12 @@ AsciiSPrintUnicodeFormat (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
index 288c431cdceb5a63860da27b54b58b0f4dba8b7f..c347bf29487b40ec6154b1feaac4874747622384 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -143,6 +143,8 @@ Returns:
     Status      = RegisterEsalFunction (FunctionId, ClassGuid, Function, ModuleGlobal);\r
   }\r
 \r
     Status      = RegisterEsalFunction (FunctionId, ClassGuid, Function, ModuleGlobal);\r
   }\r
 \r
+  VA_END (Args);\r
+\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
index ce257c4e1c8d5af670e41beb598434da358f0a4c..eaf785bd36ce62956f21fa00f96f4dc5f5c13472 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2005, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -113,6 +113,7 @@ Returns:
 \r
   VA_START (Marker, Format);\r
   EfiDebugVPrintWorker (ErrorLevel, Format, Marker, sizeof (Buffer), Buffer);\r
 \r
   VA_START (Marker, Format);\r
   EfiDebugVPrintWorker (ErrorLevel, Format, Marker, sizeof (Buffer), Buffer);\r
+  VA_END (Marker);\r
 \r
   //\r
   // We choose NOT to use PEI_REPORT_STATUS_CODE here, because when debug is enable,\r
 \r
   //\r
   // We choose NOT to use PEI_REPORT_STATUS_CODE here, because when debug is enable,\r
@@ -127,5 +128,4 @@ Returns:
                     (EFI_STATUS_CODE_DATA *) Buffer\r
                     );\r
 \r
                     (EFI_STATUS_CODE_DATA *) Buffer\r
                     );\r
 \r
-  return ;\r
 }\r
 }\r
index 2e63672582a04faef6137d650e6cbeb6296c8872..d826b9000e05056063e5261a9f90305e2763083e 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -311,6 +311,8 @@ Returns:
     Status      = RegisterEsalFunction (FunctionId, ClassGuid, Function, ModuleGlobal);\r
   }\r
 \r
     Status      = RegisterEsalFunction (FunctionId, ClassGuid, Function, ModuleGlobal);\r
   }\r
 \r
+  VA_END (Args);\r
+\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
index 9513d05bed594774c9c89948efc5999e6b19460e..44df1172b12d57e81dc81db5d6cf43b2e0b63251 100644 (file)
@@ -1,6 +1,6 @@
 /*++ @file\r
 \r
 /*++ @file\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 Portions copyright (c) 2011, Apple Inc. All rights reserved.\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 Portions copyright (c) 2011, Apple Inc. All rights reserved.\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -911,14 +911,10 @@ Returns:
     //\r
     // Check input parameters\r
     //\r
     //\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
       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
   } while (1);\r
 \r
   VA_END (args);\r
index e4ca5b5539f267acc58559cee031379c4e06be6f..f6ab54ed6a87d86697d7867ff17a40f195cad36f 100644 (file)
@@ -4,7 +4,7 @@
   Note that if the debug message length is larger than the maximum allowable\r
   record length, then the debug message will be ignored directly.\r
 \r
   Note that if the debug message length is larger than the maximum allowable\r
   record length, then the debug message will be ignored directly.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
   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
@@ -207,6 +207,7 @@ DebugPrint (
     // If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then return\r
     //\r
     if ((CHAR8 *)BaseListMarker > FormatString) {\r
     // If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then return\r
     //\r
     if ((CHAR8 *)BaseListMarker > FormatString) {\r
+      VA_END (VaListMarker);\r
       return;\r
     }\r
   }\r
       return;\r
     }\r
   }\r
index 3f4f4f5f57ec70085a5e0eb3a0bfab335bf27aae..a4d1f0271828c799fe6a0e710109fe456322b6a0 100644 (file)
@@ -2,7 +2,7 @@
   Mde UEFI library API implementation.\r
   Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE\r
 \r
   Mde UEFI library API implementation.\r
   Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE\r
 \r
-  Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 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
   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
@@ -623,6 +623,8 @@ PrintXY (
 \r
   PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);\r
 \r
 \r
   PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);\r
 \r
+  VA_END (Marker);\r
+\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
@@ -699,6 +701,8 @@ AsciiPrintXY (
 \r
   PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);\r
 \r
 \r
   PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);\r
 \r
+  VA_END (Marker);\r
+\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
index 3b4d4e03adb26c5c105d5158229dd8f74daab088..c0750ad1767bb7559b3e4d2d1d757bc6beae35aa 100644 (file)
@@ -6,7 +6,7 @@
   protocol related to this implementation, not in the public spec. So, this \r
   library instance is only for this code base.\r
 \r
   protocol related to this implementation, not in the public spec. So, this \r
   library instance is only for this code base.\r
 \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 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
 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
@@ -366,9 +366,12 @@ UnicodeSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -515,9 +518,12 @@ UnicodeSPrintAsciiFormat (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -714,9 +720,12 @@ AsciiSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -863,9 +872,12 @@ AsciiSPrintUnicodeFormat (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
@@ -1056,9 +1068,12 @@ InternalPrintLibSPrint (
   )\r
 {\r
   VA_LIST  Marker;\r
   )\r
 {\r
   VA_LIST  Marker;\r
+  UINTN    NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);\r
+  NumberOfPrinted = InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 #define WARNING_STATUS_NUMBER         4\r
 }\r
 \r
 #define WARNING_STATUS_NUMBER         4\r
index 1321dd4288759e1061ec9e56a266f1efc23a7401..23b6c1bd84724cd6dd3f2dd9aa4b6d7ff0c49408 100644 (file)
@@ -2,7 +2,7 @@
   This module contains EBC support routines that are customized based on\r
   the target processor.\r
 \r
   This module contains EBC support routines that are customized based on\r
   the target processor.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
 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
@@ -134,6 +134,7 @@ EbcInterpret (
   Arg14     = VA_ARG (List, UINT64);\r
   Arg15     = VA_ARG (List, UINT64);\r
   Arg16     = VA_ARG (List, UINT64);\r
   Arg14     = VA_ARG (List, UINT64);\r
   Arg15     = VA_ARG (List, UINT64);\r
   Arg16     = VA_ARG (List, UINT64);\r
+  VA_END (List);\r
   //\r
   // Now clear out our context\r
   //\r
   //\r
   // Now clear out our context\r
   //\r
index 941d0958f99e062c0461b1a5c7bfd38ea4e1ff8d..eeadf2494fb418bea03076e4452c08aa3e51b530 100644 (file)
@@ -15,7 +15,7 @@ type:
   '%' - Print a %\r
 \r
 \r
   '%' - Print a %\r
 \r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
 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
@@ -152,9 +152,12 @@ ConsolePrint (
   )\r
 {\r
   VA_LIST Args;\r
   )\r
 {\r
   VA_LIST Args;\r
+  UINTN   LengthOfPrinted;\r
 \r
   VA_START (Args, Fmt);\r
 \r
   VA_START (Args, Fmt);\r
-  return PrintInternal ((UINTN) -1, (UINTN) -1, gST->ConOut, Fmt, Args);\r
+  LengthOfPrinted = PrintInternal ((UINTN) -1, (UINTN) -1, gST->ConOut, Fmt, Args);\r
+  VA_END (Args);\r
+  return LengthOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
@@ -216,9 +219,12 @@ PrintAt (
   )\r
 {\r
   VA_LIST Args;\r
   )\r
 {\r
   VA_LIST Args;\r
+  UINTN   LengthOfPrinted;\r
 \r
   VA_START (Args, Fmt);\r
 \r
   VA_START (Args, Fmt);\r
-  return PrintInternal (Column, Row, gST->ConOut, Fmt, Args);\r
+  LengthOfPrinted = PrintInternal (Column, Row, gST->ConOut, Fmt, Args);\r
+  VA_END (Args);\r
+  return LengthOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
index 7c6a032f8b8b967eef08a7385bf6d8354c6e6c05..1c3a7f6ba441f54879fd2864b3208231b8b3091e 100644 (file)
@@ -852,8 +852,6 @@ CreateDialog (
   ASSERT (TempString);\r
   ASSERT (BufferedString);\r
 \r
   ASSERT (TempString);\r
   ASSERT (BufferedString);\r
 \r
-  VA_START (Marker, KeyValue);\r
-\r
   //\r
   // Zero the outgoing buffer\r
   //\r
   //\r
   // Zero the outgoing buffer\r
   //\r
@@ -875,6 +873,8 @@ CreateDialog (
 \r
   LargestString = 0;\r
 \r
 \r
   LargestString = 0;\r
 \r
+  VA_START (Marker, KeyValue);\r
+\r
   //\r
   // Determine the largest string in the dialog box\r
   // Notice we are starting with 1 since String is the first string\r
   //\r
   // Determine the largest string in the dialog box\r
   // Notice we are starting with 1 since String is the first string\r
index daeb8d45365bd19ee90366dfd9e8634fffd50fcf..43b2b3c1d3c0c3bb71da4b239e58d46a45cabcea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Base Print Library instance implementation.\r
 \r
 /** @file\r
   Base Print Library instance implementation.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. 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
   Portions copyright (c) 2008 - 2009, Apple Inc. 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
@@ -165,9 +165,12 @@ UnicodeSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -306,9 +309,12 @@ UnicodeSPrintAsciiFormat (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -496,9 +502,12 @@ AsciiSPrint (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -637,9 +646,12 @@ AsciiSPrintUnicodeFormat (
   )\r
 {\r
   VA_LIST Marker;\r
   )\r
 {\r
   VA_LIST Marker;\r
+  UINTN   NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 \r
 \r
 }\r
 \r
 \r
index 30451b922efd44694d81d5ef0705115228335865..8a0cfa6e20e4737f65e9a4e52af3ebbec70cee74 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Print Library internal worker functions.\r
 \r
 /** @file\r
   Print Library internal worker functions.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
   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
@@ -982,7 +982,10 @@ BasePrintLibSPrint (
   )\r
 {\r
   VA_LIST  Marker;\r
   )\r
 {\r
   VA_LIST  Marker;\r
+  UINTN    NumberOfPrinted;\r
 \r
   VA_START (Marker, FormatString);\r
 \r
   VA_START (Marker, FormatString);\r
-  return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);\r
+  NumberOfPrinted = BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);\r
+  VA_END (Marker);\r
+  return NumberOfPrinted;\r
 }\r
 }\r
index 82266f5df015cae40ac9f908f14dd65cb6d14156..0f48c63f7b85f0011b6354469380fc2bb6e0bb78 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The library implements the Extended SAL Library Class for boot service only modules.\r
 \r
 /** @file\r
   The library implements the Extended SAL Library Class for boot service only modules.\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 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
   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
@@ -196,6 +196,8 @@ RegisterEsalClass (
     Status = RegisterEsalFunction (FunctionId, ClassGuidLo, ClassGuidHi, Function, ModuleGlobal);\r
   }\r
 \r
     Status = RegisterEsalFunction (FunctionId, ClassGuidLo, ClassGuidHi, Function, ModuleGlobal);\r
   }\r
 \r
+  VA_END (Args);\r
+\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
index 1a599e6687cfda7f50210f9065e471f5e8f2f36c..f9e974b373d48ab7c994b974e30e1c4d3d3b7fc3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library implements the Extended SAL Library Class for use in boot services and runtime.\r
 \r
 /** @file\r
   This library implements the Extended SAL Library Class for use in boot services and runtime.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
   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
@@ -319,6 +319,8 @@ RegisterEsalClass (
     Status      = RegisterEsalFunction (FunctionId, ClassGuidLo, ClassGuidHi, Function, ModuleGlobal);\r
   }\r
 \r
     Status      = RegisterEsalFunction (FunctionId, ClassGuidLo, ClassGuidHi, Function, ModuleGlobal);\r
   }\r
 \r
+  VA_END (Args);\r
+\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
index 8ecb58dbe979a0c9415dd42bc529706def1b67af..6eadc120c82021ad95d01ab11f0d17fbe9fc4752 100644 (file)
@@ -2,7 +2,7 @@
   Mde UEFI library API implementation.\r
   Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE\r
 \r
   Mde UEFI library API implementation.\r
   Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 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
   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
@@ -623,6 +623,8 @@ PrintXY (
 \r
   PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);\r
 \r
 \r
   PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);\r
 \r
+  VA_END (Marker);\r
+\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
@@ -699,6 +701,8 @@ AsciiPrintXY (
 \r
   PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);\r
 \r
 \r
   PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);\r
 \r
+  VA_END (Marker);\r
+\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
   ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
@@ -796,7 +800,11 @@ CatSPrint (
   )\r
 {\r
   VA_LIST   Marker;\r
   )\r
 {\r
   VA_LIST   Marker;\r
+  CHAR16    *NewString;\r
+\r
   VA_START (Marker, FormatString);\r
   VA_START (Marker, FormatString);\r
-  return (CatVSPrint(String, FormatString, Marker));\r
+  NewString = CatVSPrint(String, FormatString, Marker);\r
+  VA_END (Marker);\r
+  return NewString;\r
 }\r
 \r
 }\r
 \r
index 2028c606ab8836412365f3ae56b9493bf46b3bc1..67d88c650c264d140cc00abbb4a93d955233a947 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
 /**@file\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\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
 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
@@ -950,14 +950,10 @@ Returns:
     //\r
     // Check input parameters\r
     //\r
     //\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
       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
   } while (1);\r
 \r
   VA_END (args);\r
index 0c859a2650d789482023b41c3625291e285a3d32..a1d43d2eba424c80f0502da518d6e5fdd1202327 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
 /**@file\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
 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
@@ -123,6 +123,8 @@ SecPrint (
   \r
   _vsnprintf (Buffer, sizeof (Buffer), Format, Marker);\r
 \r
   \r
   _vsnprintf (Buffer, sizeof (Buffer), Format, Marker);\r
 \r
+  va_end (Marker);\r
+\r
   CharCount = strlen (Buffer);\r
   WriteFile (\r
     GetStdHandle (STD_OUTPUT_HANDLE), \r
   CharCount = strlen (Buffer);\r
   WriteFile (\r
     GetStdHandle (STD_OUTPUT_HANDLE), \r
index 742c98a03e7cb67e29ad39b12448ffb43e377751..ea9ffdcd61d22408671537561c9c6bb9459fd5b6 100644 (file)
@@ -2,7 +2,7 @@
   Firmware Block Services to support emulating non-volatile variables\r
   by pretending that a memory buffer is storage for the NV variables.\r
 \r
   Firmware Block Services to support emulating non-volatile variables\r
   by pretending that a memory buffer is storage for the NV variables.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
   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
@@ -379,6 +379,7 @@ FvbProtocolEraseBlocks (
       );\r
     VA_START (args, This);\r
     PlatformFvbBlocksErased (This, args);\r
       );\r
     VA_START (args, This);\r
     PlatformFvbBlocksErased (This, args);\r
+    VA_END (args);\r
   }\r
 \r
   return EFI_SUCCESS;\r
   }\r
 \r
   return EFI_SUCCESS;\r
index 873620826dc36bec759f8c6f5b089e9eca534c57..f60006125f3ce375a37b02fe7d791e678005c7da 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 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
   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
@@ -421,6 +421,8 @@ PrintToken (
   SetMem( mPrintTokenBuffer, BufferSize, 0);\r
 \r
   Return = UnicodeVSPrint (mPrintTokenBuffer, BufferSize, StringPtr, Marker);\r
   SetMem( mPrintTokenBuffer, BufferSize, 0);\r
 \r
   Return = UnicodeVSPrint (mPrintTokenBuffer, BufferSize, StringPtr, Marker);\r
+  VA_END (Marker);\r
+  \r
   if (Return > 0 && gST->ConOut != NULL) {\r
     gST->ConOut->OutputString (gST->ConOut, mPrintTokenBuffer);\r
   }\r
   if (Return > 0 && gST->ConOut != NULL) {\r
     gST->ConOut->OutputString (gST->ConOut, mPrintTokenBuffer);\r
   }\r
index 635ff77e13c7145ecaa5326949b2fc2eecb2cedc..68489d3e3f1ce29ef005324df32b459b8fa91d06 100644 (file)
@@ -1,7 +1,7 @@
 /** @file  \r
   TIS (TPM Interface Specification) functions used by TPM Dxe driver.\r
   \r
 /** @file  \r
   TIS (TPM Interface Specification) functions used by TPM Dxe driver.\r
   \r
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 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
 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
@@ -376,7 +376,7 @@ TisPcExecute (
     if (*Fmt == '/') break;\r
     Status = TisPcSendV (*Fmt, &Ap, TpmCommandBuf, &BufSize);\r
     if (EFI_ERROR( Status )) {\r
     if (*Fmt == '/') break;\r
     Status = TisPcSendV (*Fmt, &Ap, TpmCommandBuf, &BufSize);\r
     if (EFI_ERROR( Status )) {\r
-      return Status;\r
+      goto Error;\r
     }\r
     Fmt++;\r
   }\r
     }\r
     Fmt++;\r
   }\r
@@ -389,7 +389,7 @@ TisPcExecute (
     // Ensure the TPM state change from "Reception" to "Idle/Ready"\r
     //\r
     MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);\r
     // Ensure the TPM state change from "Reception" to "Idle/Ready"\r
     //\r
     MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);\r
-    return Status; \r
+    goto Error;\r
   }\r
 \r
   MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_GO);\r
   }\r
 \r
   MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_GO);\r
@@ -404,7 +404,7 @@ TisPcExecute (
   //\r
   MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);\r
   if (EFI_ERROR (Status)) {\r
   //\r
   MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);\r
   if (EFI_ERROR (Status)) {\r
-    return Status;\r
+    goto Error;\r
   }\r
   \r
   //\r
   }\r
   \r
   //\r
@@ -418,14 +418,16 @@ TisPcExecute (
     }\r
     Status = TisPcReceiveV (*Fmt, &Ap, TpmCommandBuf, &BufSize, ResponseSize, &DataFinished);\r
     if (EFI_ERROR (Status)) {\r
     }\r
     Status = TisPcReceiveV (*Fmt, &Ap, TpmCommandBuf, &BufSize, ResponseSize, &DataFinished);\r
     if (EFI_ERROR (Status)) {\r
-      return Status;\r
+      goto Error;\r
     }\r
     if (DataFinished) {\r
     }\r
     if (DataFinished) {\r
+      VA_END (Ap);\r
       return EFI_SUCCESS;\r
     }\r
     Fmt++;\r
   }\r
 \r
       return EFI_SUCCESS;\r
     }\r
     Fmt++;\r
   }\r
 \r
+Error:\r
   VA_END (Ap);\r
   return Status;\r
 }\r
   VA_END (Ap);\r
   return Status;\r
 }\r
index 0e2f93debc27beaff64df48fa6556809b09daf23..0bee8e38992d5b601a163f2641be02c923648e54 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides interface to EFI_FILE_HANDLE functionality.\r
 \r
 /** @file\r
   Provides interface to EFI_FILE_HANDLE functionality.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved. <BR>\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
   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
@@ -1089,8 +1089,6 @@ FileHandlePrintLine(
   CHAR16            *Buffer;\r
   EFI_STATUS        Status;\r
 \r
   CHAR16            *Buffer;\r
   EFI_STATUS        Status;\r
 \r
-  VA_START (Marker, Format);\r
-\r
   //\r
   // Get a buffer to print into\r
   //\r
   //\r
   // Get a buffer to print into\r
   //\r
@@ -1100,7 +1098,9 @@ FileHandlePrintLine(
   //\r
   // Print into our buffer\r
   //\r
   //\r
   // Print into our buffer\r
   //\r
+  VA_START (Marker, Format);\r
   UnicodeVSPrint (Buffer, PcdGet16 (PcdShellPrintBufferSize), Format, Marker);\r
   UnicodeVSPrint (Buffer, PcdGet16 (PcdShellPrintBufferSize), Format, Marker);\r
+  VA_END (Marker);\r
 \r
   //\r
   // Print buffer into file\r
 \r
   //\r
   // Print buffer into file\r
index c3e4df2f82fb2543582ffa1c4071ff7bc3887e3d..b49a660eabf8dfdc6933ec9367c52d0380427bc8 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\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
 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
@@ -918,14 +918,10 @@ Returns:
     //\r
     // Check input parameters\r
     //\r
     //\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
       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
   } while (1);\r
 \r
   VA_END (args);\r