diff options
Diffstat (limited to 'sys/arch/kbus')
-rw-r--r-- | sys/arch/kbus/kbus/conf.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/arch/kbus/kbus/conf.c b/sys/arch/kbus/kbus/conf.c index d9c33931d4a..00a833e13de 100644 --- a/sys/arch/kbus/kbus/conf.c +++ b/sys/arch/kbus/kbus/conf.c @@ -389,14 +389,6 @@ static int chrtoblktbl[] = { /*108 */ NODEV, /*109 */ NODEV, /*110 */ 8, - /*111 */ NODEV, - /*112 */ NODEV, - /*113 */ NODEV, - /*114 */ NODEV, - /*115 */ NODEV, - /*116 */ NODEV, - /*117 */ NODEV, - /*118 */ NODEV, }; /* @@ -408,7 +400,8 @@ chrtoblk(dev) { int blkmaj; - if (major(dev) >= nchrdev) + if (major(dev) >= MAXDEV || + major(dev) > sizeof(chrtoblktbl)/sizeof(chrtoblktbl[0])) return (NODEV); blkmaj = chrtoblktbl[major(dev)]; if (blkmaj == NODEV) |