OvmfPkg/XenBusDxe: duplicate twice-iterated VA_LIST in XenStoreVSPrint()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: add spaces before macro invocation parentheses; clean
 up subject line]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Zenith432 2016-05-16 15:51:25 +00:00 committed by Laszlo Ersek
parent 05b2f9c94e
commit 1250f37066
1 changed files with 4 additions and 1 deletions

View File

@ -1319,8 +1319,11 @@ XenStoreVSPrint (
CHAR8 *Buf;
XENSTORE_STATUS Status;
UINTN BufSize;
VA_LIST Marker2;
BufSize = SPrintLengthAsciiFormat (FormatString, Marker) + 1;
VA_COPY (Marker2, Marker);
BufSize = SPrintLengthAsciiFormat (FormatString, Marker2) + 1;
VA_END (Marker2);
Buf = AllocateZeroPool (BufSize);
AsciiVSPrint (Buf, BufSize, FormatString, Marker);
Status = XenStoreWrite (Transaction, DirectoryPath, Node, Buf);