From 495cf41f6b059a37a297b431d6360c3454f2bac0 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 16 Jun 2006 20:44:39 +0000 Subject: Fix range check in sgc_slottopa(). --- sys/arch/hp300/dev/sgc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/hp300/dev') diff --git a/sys/arch/hp300/dev/sgc.c b/sys/arch/hp300/dev/sgc.c index 6b4115590ea..92e083a0827 100644 --- a/sys/arch/hp300/dev/sgc.c +++ b/sys/arch/hp300/dev/sgc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sgc.c,v 1.2 2005/01/23 00:03:10 miod Exp $ */ +/* $OpenBSD: sgc.c,v 1.3 2006/06/16 20:44:38 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -132,7 +132,7 @@ sgc_slottopa(int slot) { u_long rval; - if (slot < 0 || slot > SGC_NSLOTS) + if (slot < 0 || slot >= SGC_NSLOTS) rval = 0; else rval = SGC_BASE + (slot * SGC_DEVSIZE); -- cgit v1.2.3