xenstore: handle daemon creation errors
authorNorbert Manthey <nmanthey@amazon.de>
Fri, 26 Feb 2021 14:41:39 +0000 (15:41 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 1 Apr 2021 16:12:05 +0000 (17:12 +0100)
commit60f0ba136d5a4c88377e28e5eb40606a7f9f6785
tree29484b4ec2ca1057a280ab88086ab934db85f493
parent00948dcd6a5412695b42c6d5045b0d3075b14114
xenstore: handle daemon creation errors

In rare cases, the path to the daemon socket cannot be created as it is
longer than PATH_MAX. Instead of failing with a NULL pointer dereference,
terminate the application with an error message.

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: Thomas Friebel <friebelt@amazon.de>
Reviewed-by: Julien Grall <jgrall@amazon.co.uk>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/xenstore/xenstored_core.c