artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9c690c
)
Fix bounds checking in wsmux_getmux().
author
miod
<miod@openbsd.org>
Fri, 16 Aug 2024 12:22:17 +0000
(12:22 +0000)
committer
miod
<miod@openbsd.org>
Fri, 16 Aug 2024 12:22:17 +0000
(12:22 +0000)
sys/dev/wscons/wsmux.c
patch
|
blob
|
history
diff --git
a/sys/dev/wscons/wsmux.c
b/sys/dev/wscons/wsmux.c
index
f483453
..
3176c6e
100644
(file)
--- a/
sys/dev/wscons/wsmux.c
+++ b/
sys/dev/wscons/wsmux.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: wsmux.c,v 1.5
8 2024/05/29 06:39:13 jsg Exp $
*/
+/* $OpenBSD: wsmux.c,v 1.5
9 2024/08/16 12:22:17 miod Exp $
*/
/* $NetBSD: wsmux.c,v 1.37 2005/04/30 03:47:12 augustss Exp $ */
/*
@@
-143,7
+143,7
@@
wsmux_getmux(int n)
struct wsmux_softc **new, **old;
int i;
- if (n >= WSMUX_MAXDEV)
+ if (n
< 0 || n
>= WSMUX_MAXDEV)
return (NULL);
/* Make sure there is room for mux n in the table */