diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-02-10 21:06:51 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-02-10 21:06:51 +0000 |
commit | 10165e3322377187761bfdf288373345a87ce1a7 (patch) | |
tree | 5972e7d45b8442eb2697c8635652179c736269a2 /sys | |
parent | 3cf0c4966649340725e06098fca1f1636cf55e4f (diff) |
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')
-rw-r--r-- | sys/kern/tty_pty.c | 4 |
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; |