diff options
author | Zenith432 <zenith432@users.sourceforge.net> | 2016-05-16 23:50:06 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-05-18 09:50:43 +0800 |
commit | b98993580e3c07cfa139ed19b6fb4f1bb4db9edc (patch) | |
tree | 1cf0c528ad1566b3270f1dd3b3282b80e89f49ad /MdePkg | |
parent | 415700ec3eb5f6414e6278bbf338d142052b3138 (diff) | |
download | edk2-platforms-b98993580e3c07cfa139ed19b6fb4f1bb4db9edc.tar.xz |
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')
-rw-r--r-- | MdePkg/Library/UefiDevicePathLib/DevicePathToText.c | 2 |
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;
|