|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 16/17] xeniface: route AccessWmiBuffer unknown-type exit through common path
The default case returned directly on an unknown WMI_TYPE, skipping
va_end and leaving RequiredSize at its initial value.
Assert on unknown types and jump to a common exit, so va_end is always
called and RequiredSize is always set.
Assisted-by: Claude/Opus-4
Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
src/xeniface/wmi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/xeniface/wmi.c b/src/xeniface/wmi.c
index d8e1a73..3392d3d 100644
--- a/src/xeniface/wmi.c
+++ b/src/xeniface/wmi.c
@@ -797,10 +797,12 @@ AccessWmiBuffer(
} break;
default:
- return FALSE;
+ overflow = TRUE;
+ goto done;
}
}
+done:
*RequiredSize = (ULONG)(position - Buffer);
va_end(vl);
if (overflow)
--
2.55.0.windows.5
--
Césaire Mounah | Vates Windows Guest Tools Engineer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |