summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2005-03-18 05:43:34 +0000
committerdas <das@FreeBSD.org>2005-03-18 05:43:34 +0000
commit64406ce1fb5254fb3009150968e2acc45648725e (patch)
treea3ba0da7fbadc709a60f75ed192220a55395ddf4
parentcaf92f76fe5c693d52e0c289b529107e37bdf3f8 (diff)
downloadFreeBSD-src-64406ce1fb5254fb3009150968e2acc45648725e.zip
FreeBSD-src-64406ce1fb5254fb3009150968e2acc45648725e.tar.gz
Don't read past the end of pVDevice[]. (Previously, we would iterate
twice as many times as there were entries in the array.) Spotted by: Ted Unangst using the Coverity Prevent static analysis tool Reviewed by: scottl
-rw-r--r--sys/dev/hptmv/gui_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/hptmv/gui_lib.c b/sys/dev/hptmv/gui_lib.c
index 41ab69a..19fd2f8 100644
--- a/sys/dev/hptmv/gui_lib.c
+++ b/sys/dev/hptmv/gui_lib.c
@@ -1257,7 +1257,7 @@ int hpt_default_ioctl(_VBUS_ARG
while(pAdapter != 0)
{
pVBus = &pAdapter->VBus;
- for(i = 0; i < MAX_ARRAY_PER_VBUS; i++)
+ for(i = 0; i < MAX_VDEVICE_PER_VBUS; i++)
{
if(!(pTop = pVBus->pVDevice[i])) continue;
#if MAX_VBUS>1
OpenPOWER on IntegriCloud