[Pkg-libvirt-commits] [libguestfs] 111/156: launch: direct: check for null paths in make_uri
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:26:08 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch master
in repository libguestfs.
commit 0a238243f67f1b2de8bcc51b264075fc9bec100d
Author: Pino Toscano <ptoscano at redhat.com>
Date: Mon Jul 28 19:29:14 2014 +0200
launch: direct: check for null paths in make_uri
Some protocols may pass a null path to make_uri, so make sure to handle
that gracefully.
(cherry picked from commit 043cf4fbe30894af481c242095ed4cd436e136ea)
---
src/launch-direct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/launch-direct.c b/src/launch-direct.c
index 3857f53..42f828e 100644
--- a/src/launch-direct.c
+++ b/src/launch-direct.c
@@ -1220,7 +1220,7 @@ make_uri (guestfs_h *g, const char *scheme, const char *user,
CLEANUP_FREE char *userauth = NULL;
/* Need to add a leading '/' to URI paths since xmlSaveUri doesn't. */
- if (path[0] != '/') {
+ if (path != NULL && path[0] != '/') {
pathslash = safe_asprintf (g, "/%s", path);
uri.path = pathslash;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list