From 1e737f33a018feb91f471d8d617ffae2aba26a37 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 26 Feb 2009 10:14:10 +0000 Subject: [PATCH] Don't use PTY name as format string, even though it isn't insecure here. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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). --- sys/kern/tty_pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 97af90d015f..3bb5b476523 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 -- 2.45.2