summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-02-26 10:14:10 +0000
committered <ed@FreeBSD.org>2009-02-26 10:14:10 +0000
commit1c7d1f084a9a904ccb490cec891ee1cbef81997d (patch)
tree75ffc3502b967f0a14e0dd372d2548d94fc7fecd /sys
parent53dcaae80d92e57982a9b0a673035567f4e6a746 (diff)
downloadFreeBSD-src-1c7d1f084a9a904ccb490cec891ee1cbef81997d.zip
FreeBSD-src-1c7d1f084a9a904ccb490cec891ee1cbef81997d.tar.gz
Don't use PTY name as format string, even though it isn't insecure here.
It's guaranteed that the `name' variable always contains a string of the form pty[l‐sL‐S][0‐9a‐v], but I'd rather keep the compiler happy (LLVM).
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty_pty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 97af90d..3bb5b47 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -113,7 +113,7 @@ pty_clone(void *arg, struct ucred *cr, char *name, int namelen,
/* Create the controller device node. */
*dev = make_dev_credf(MAKEDEV_REF, &ptydev_cdevsw, 0,
- NULL, UID_ROOT, GID_WHEEL, 0666, name);
+ NULL, UID_ROOT, GID_WHEEL, 0666, "%s", name);
}
static void
OpenPOWER on IntegriCloud