]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Reinitialize twice-iterated VA_LIST in variadic function UefiDevicePathLibCat...
authorZenith432 <zenith432@users.sourceforge.net>
Mon, 16 May 2016 15:50:06 +0000 (23:50 +0800)
committerLiming Gao <liming.gao@intel.com>
Wed, 18 May 2016 01:50:43 +0000 (09:50 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

index 92db3b1d84bbe42543e2162c87cf902ac9c32be9..5922deeea840b2a75eb24565e61890e043e9a93c 100644 (file)
@@ -42,6 +42,7 @@ UefiDevicePathLibCatPrint (
 \r
   VA_START (Args, Fmt);\r
   Count = SPrintLength (Fmt, Args);\r
+  VA_END(Args);\r
 \r
   if ((Str->Count + (Count + 1)) * sizeof (CHAR16) > Str->Capacity) {\r
     Str->Capacity = (Str->Count + (Count + 1) * 2) * sizeof (CHAR16);\r
@@ -52,6 +53,7 @@ UefiDevicePathLibCatPrint (
                  );\r
     ASSERT (Str->Str != NULL);\r
   }\r
+  VA_START (Args, Fmt);\r
   UnicodeVSPrint (&Str->Str[Str->Count], Str->Capacity - Str->Count * sizeof (CHAR16), Fmt, Args);\r
   Str->Count += Count;\r
   \r