aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hptmv
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2005-03-18 05:43:31 +0000
committerDavid Schultz <das@FreeBSD.org>2005-03-18 05:43:31 +0000
commit844b51308e682299a9182d31f711634813d33e6c (patch)
tree2dc265ef79541df0a7d6944797815e2f8e10ea42 /sys/dev/hptmv
parent36fed96550cc5e0c7c87d0c69eb5beccf1d2d77f (diff)
downloadsrc-844b51308e682299a9182d31f711634813d33e6c.tar.gz
src-844b51308e682299a9182d31f711634813d33e6c.zip
Don't write past the end of the VendorId field (and into the ProductId
field). Spotted by: Ted Unangst using the Coverity Prevent static analysis tool Reviewed by: scottl
Notes
Notes: svn path=/head/; revision=143786
Diffstat (limited to 'sys/dev/hptmv')
-rw-r--r--sys/dev/hptmv/entry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c
index 504ac5bff79a..34369507a5fb 100644
--- a/sys/dev/hptmv/entry.c
+++ b/sys/dev/hptmv/entry.c
@@ -2657,7 +2657,7 @@ SetInquiryData(PINQUIRYDATA inquiryData, PVDevice pVDev)
inquiryData->RemovableMedia = 1;
/* Fill in vendor identification fields. */
- for (i = 0; i < 20; i += 2) {
+ for (i = 0; i < 16; i += 2) {
inquiryData->VendorId[i] =
((PUCHAR)pIdentify->ModelNumber)[i + 1];
inquiryData->VendorId[i+1] =