diff options
author | das <das@FreeBSD.org> | 2005-03-18 05:43:31 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2005-03-18 05:43:31 +0000 |
commit | caf92f76fe5c693d52e0c289b529107e37bdf3f8 (patch) | |
tree | 2dc265ef79541df0a7d6944797815e2f8e10ea42 /sys/dev/hptmv | |
parent | 7e9a7073ef377ae41f09b4dfb21c34a4a6b3a12c (diff) | |
download | FreeBSD-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.c | 2 |
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] = |