summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptmv
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2005-03-18 05:43:31 +0000
committerdas <das@FreeBSD.org>2005-03-18 05:43:31 +0000
commitcaf92f76fe5c693d52e0c289b529107e37bdf3f8 (patch)
tree2dc265ef79541df0a7d6944797815e2f8e10ea42 /sys/dev/hptmv
parent7e9a7073ef377ae41f09b4dfb21c34a4a6b3a12c (diff)
downloadFreeBSD-src-caf92f76fe5c693d52e0c289b529107e37bdf3f8.zip
FreeBSD-src-caf92f76fe5c693d52e0c289b529107e37bdf3f8.tar.gz
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
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 504ac5b..3436950 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] =
OpenPOWER on IntegriCloud