From 92e42cfb11bf42cbfb285cb70bfe1c1ce985f548 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 31 May 2017 04:35:38 +0000 Subject: [PATCH] avoid going outside array bounds ok krw@ deraadt@ --- sys/dev/ic/dpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c index 983f630241d..7c97ac4b101 100644 --- a/sys/dev/ic/dpt.c +++ b/sys/dev/ic/dpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dpt.c,v 1.35 2014/12/19 22:44:58 guenther Exp $ */ +/* $OpenBSD: dpt.c,v 1.36 2017/05/31 04:35:38 jsg Exp $ */ /* $NetBSD: dpt.c,v 1.12 1999/10/23 16:26:33 ad Exp $ */ /*- @@ -324,7 +324,7 @@ dpt_init(sc, intrstr) * dpt0: interrupting at irq 10 * dpt0: 64 queued commands, 1 channel(s), adapter on ID(s) 7 */ - for (i = 0; ei->ei_vendor[i] != ' ' && i < 8; i++) + for (i = 0; ei->ei_vendor[i] != ' ' && i < 7; i++) ; ei->ei_vendor[i] = '\0'; -- 2.20.1