When piecing together the file name of a vgdb FIFO do not allow
user names and host names containing '/' characters.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14526 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c
index d330cb5..160e6ee 100644
--- a/coregrind/vgdb.c
+++ b/coregrind/vgdb.c
@@ -517,10 +517,12 @@
user = getenv("LOGNAME");
if (user == NULL) user = getenv("USER");
if (user == NULL) user = "???";
+ if (strchr(user, '/')) user = "???";
host = getenv("HOST");
if (host == NULL) host = getenv("HOSTNAME");
if (host == NULL) host = "???";
+ if (strchr(host, '/')) host = "???";
len = strlen(vgdb_prefix) + strlen(user) + strlen(host) + 40;
from_gdb_to_pid = vmalloc (len);