From: Rahul Dadhich Date: Fri, 5 Oct 2018 10:56:50 +0000 (+0530) Subject: Open source Vulnerability fixed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36a0af4eb630bb8c2347f4d1237068548efe0805;p=sdk%2Femulator%2Fqemu.git Open source Vulnerability fixed Change-Id: I0a8b15c76ff603044b8bc50005bcc6ac27143d26 Signed-off-by: Rahul Dadhich --- diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 845675e..8131aac 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1061,8 +1061,13 @@ static int local_name_to_path(FsContext *ctx, V9fsPath *dir_path, { if (dir_path) { v9fs_path_sprintf(target, "%s/%s", dir_path->data, name); - } else { + } else if (strcmp(name, "/")) { v9fs_path_sprintf(target, "%s", name); + } else { + /* We want the path of the export root to be relative, otherwise + * "*at()" syscalls would treat it as "/" in the host. + */ + v9fs_path_sprintf(target, "%s", "."); } return 0; }