summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pty/pty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pty/pty.c b/sys/dev/pty/pty.c
index e38ed69..5036cb2 100644
--- a/sys/dev/pty/pty.c
+++ b/sys/dev/pty/pty.c
@@ -67,7 +67,7 @@ ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
return (EBUSY);
/* Generate device name and create PTY. */
- strcpy(name, devtoname(dev));
+ strlcpy(name, devtoname(dev), sizeof(name));
name[0] = 't';
error = pts_alloc_external(fflags & (FREAD|FWRITE), td, fp, dev, name);
OpenPOWER on IntegriCloud