Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/xenstore: Harden xs_domain_is_introduced()
The function single_with_domid() may return NULL if something went wrong (e.g. XenStored returns an error or the connection is in bad state). They are unlikely but not impossible, so it would be better to return an error and allow the caller to handle it gracefully rather than crashing. In this case we should treat it as the domain has disappeared (i.e. return false) as the caller will not likely going to be able to communicate with XenStored again. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc. Signed-off-by: Norbert Manthey <nmanthey@amazon.de> Reviewed-by: Julien Grall <jgrall@amazon.co.uk> Reviewed-by: Raphael Ning <raphning@amazon.co.uk> Reviewed-by: Juergen Gross <jgross@suse.com> Release-Acked-by: Ian Jackson <iwj@xenproject.org>
- Loading branch information