mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
415700ec3e
commit
b98993580e
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue