]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/XenBusDxe: duplicate twice-iterated VA_LIST in XenStoreVSPrint()
authorZenith432 <zenith432@users.sourceforge.net>
Mon, 16 May 2016 15:51:25 +0000 (15:51 +0000)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 17 May 2016 10:35:52 +0000 (12:35 +0200)
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>
OvmfPkg/XenBusDxe/XenStore.c

index 61976f91f11b7f7b4024a93dd81f7c3405081eb1..5757e78b18016a0bc321866857137d7cfb1bd87d 100644 (file)
@@ -1319,8 +1319,11 @@ XenStoreVSPrint (
   CHAR8 *Buf;\r
   XENSTORE_STATUS Status;\r
   UINTN BufSize;\r
+  VA_LIST Marker2;\r
 \r
-  BufSize = SPrintLengthAsciiFormat (FormatString, Marker) + 1;\r
+  VA_COPY (Marker2, Marker);\r
+  BufSize = SPrintLengthAsciiFormat (FormatString, Marker2) + 1;\r
+  VA_END (Marker2);\r
   Buf = AllocateZeroPool (BufSize);\r
   AsciiVSPrint (Buf, BufSize, FormatString, Marker);\r
   Status = XenStoreWrite (Transaction, DirectoryPath, Node, Buf);\r