---
xen_hyper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen_hyper.c b/xen_hyper.c
index 7c7d3e1..3d56516 100644
--- a/xen_hyper.c
+++ b/xen_hyper.c
@@ -1247,7 +1247,8 @@ xen_hyper_store_domain_context(struct xen_hyper_domain_context *dc,
dc->domain_flags = ULONG(dp + XEN_HYPER_OFFSET(domain_domain_flags));
else if (XEN_HYPER_VALID_MEMBER(domain_is_shut_down)) {
dc->domain_flags = 0;
- if (*(dp + XEN_HYPER_OFFSET(domain_is_hvm))) {
+ if (XEN_HYPER_VALID_MEMBER(domain_is_hvm) &&
+ *(dp + XEN_HYPER_OFFSET(domain_is_hvm))) {
dc->domain_flags |= XEN_HYPER_DOMS_HVM;
} else if (*(dp + XEN_HYPER_OFFSET(domain_is_privileged))) {
dc->domain_flags |= XEN_HYPER_DOMS_privileged;
--
1.8.4