From e1fde2accefe3e1e47f7769261ef4626db2ce9e4 Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Wed, 30 Oct 2013 20:51:44 +1300 Subject: [PATCH] libxc: check for xc_domain_get_guest_width failure in xc_domain_resume_any Coverity-ID: 1090351 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- tools/libxc/xc_resume.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c index cb6165049f..50724f22d7 100644 --- a/tools/libxc/xc_resume.c +++ b/tools/libxc/xc_resume.c @@ -134,7 +134,11 @@ static int xc_domain_resume_any(xc_interface *xch, uint32_t domid) return rc; } - xc_domain_get_guest_width(xch, domid, &dinfo->guest_width); + if ( xc_domain_get_guest_width(xch, domid, &dinfo->guest_width) != 0 ) + { + PERROR("Could not get domain width"); + return rc; + } if ( dinfo->guest_width != sizeof(long) ) { ERROR("Cannot resume uncooperative cross-address-size guests"); -- 2.30.2