svn commit: r189060 - head/sys/kern

Ed Schouten ed at FreeBSD.org
Thu Feb 26 02:14:10 PST 2009


Author: ed
Date: Thu Feb 26 10:14:10 2009
New Revision: 189060
URL: http://svn.freebsd.org/changeset/base/189060

Log:
  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).

Modified:
  head/sys/kern/tty_pty.c

Modified: head/sys/kern/tty_pty.c
==============================================================================
--- head/sys/kern/tty_pty.c	Thu Feb 26 06:16:15 2009	(r189059)
+++ head/sys/kern/tty_pty.c	Thu Feb 26 10:14:10 2009	(r189060)
@@ -113,7 +113,7 @@ pty_clone(void *arg, struct ucred *cr, c
 
 	/* 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


More information about the svn-src-all mailing list