summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2016-08-01 16:32:11 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2016-08-01 16:32:11 +0000
commita6a1e0b27824199927ede39105f4cf40736c226f (patch)
treed51c4fc37319fa7590975128bbbd4078491e30c4 /usr.sbin
parent2f686a99a9c91d79671cd11744efe2a22a8dd299 (diff)
Do not pass VM name directly to setproctitle format string.
Use a secure idiom instead. ok mlarkin@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/vmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/vmd/vmm.c b/usr.sbin/vmd/vmm.c
index 59403d59ec4..cb0af49f975 100644
--- a/usr.sbin/vmd/vmm.c
+++ b/usr.sbin/vmd/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.34 2016/07/29 16:36:51 stefan Exp $ */
+/* $OpenBSD: vmm.c,v 1.35 2016/08/01 16:32:10 stefan Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -529,7 +529,7 @@ start_vm(struct imsg *imsg, uint32_t *id)
return (0);
} else {
/* Child */
- setproctitle(vcp->vcp_name);
+ setproctitle("%s", vcp->vcp_name);
log_procinit(vcp->vcp_name);
create_memory_map(vcp);