summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-02-10 21:06:50 +0000
committermillert <millert@openbsd.org>2004-02-10 21:06:50 +0000
commite6f6eacec63e85b22c9d17a40e112b8ae999d03e (patch)
treecdbc4c7963d78b5af993a95b6185c9ec05887ba3 /sys/kern/tty_pty.c
parentKNF (diff)
downloadwireguard-openbsd-e6f6eacec63e85b22c9d17a40e112b8ae999d03e.tar.xz
wireguard-openbsd-e6f6eacec63e85b22c9d17a40e112b8ae999d03e.zip
Fix off-by-one wrt TTY_LETTERS and minor being out of bounds. Missed
when I fixed the other TTY_LETTERS/TTY_SUFFIX off-by-ones.
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 72e9b198c9e..c891986fd1e 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.18 2004/02/10 01:31:21 millert Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.19 2004/02/10 21:06:50 millert Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -132,7 +132,7 @@ ptydevname(int minor, struct pt_softc *pti)
i = minor / (sizeof(TTY_LETTERS) - 1);
j = minor % (sizeof(TTY_SUFFIX) - 1);
- if (i >= sizeof(TTY_LETTERS)) {
+ if (i >= sizeof(TTY_LETTERS) - 1) {
pti->pty_pn[0] = '\0';
pti->pty_sn[0] = '\0';
return;