summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/UefiDevicePathLib
diff options
context:
space:
mode:
authorZenith432 <zenith432@users.sourceforge.net>2016-05-16 23:50:06 +0800
committerLiming Gao <liming.gao@intel.com>2016-05-18 09:50:43 +0800
commitb98993580e3c07cfa139ed19b6fb4f1bb4db9edc (patch)
tree1cf0c528ad1566b3270f1dd3b3282b80e89f49ad /MdePkg/Library/UefiDevicePathLib
parent415700ec3eb5f6414e6278bbf338d142052b3138 (diff)
downloadedk2-b98993580e3c07cfa139ed19b6fb4f1bb4db9edc.tar.gz
edk2-b98993580e3c07cfa139ed19b6fb4f1bb4db9edc.tar.bz2
edk2-b98993580e3c07cfa139ed19b6fb4f1bb4db9edc.zip
MdePkg: Reinitialize twice-iterated VA_LIST in variadic function UefiDevicePathLibCatPrint()
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith432@users.sourceforge.net> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Library/UefiDevicePathLib')
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathToText.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 92db3b1d84..5922deeea8 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -42,6 +42,7 @@ UefiDevicePathLibCatPrint (
VA_START (Args, Fmt);
Count = SPrintLength (Fmt, Args);
+ VA_END(Args);
if ((Str->Count + (Count + 1)) * sizeof (CHAR16) > Str->Capacity) {
Str->Capacity = (Str->Count + (Count + 1) * 2) * sizeof (CHAR16);
@@ -52,6 +53,7 @@ UefiDevicePathLibCatPrint (
);
ASSERT (Str->Str != NULL);
}
+ VA_START (Args, Fmt);
UnicodeVSPrint (&Str->Str[Str->Count], Str->Capacity - Str->Count * sizeof (CHAR16), Fmt, Args);
Str->Count += Count;