projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b75b99
)
[SCSI] fix scsi_device_types overrun in scsi.c
author
Eric Sesterhenn
<snakebyte@gmx.de>
Tue, 26 Sep 2006 11:22:13 +0000
(13:22 +0200)
committer
James Bottomley
<jejb@mulgrave.il.steeleye.com>
Sun, 1 Oct 2006 20:04:48 +0000
(15:04 -0500)
this overrun was spotted by coverity (cid #1403).
If type == ARRAY_SIZE(scsi_device_types), we are off by one.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/scsi/scsi.c
b/drivers/scsi/scsi.c
index 7a054f9d1ee38230a7b59344e3e791d217f46d79..a21642e32c42769e6c396f85ecf0fb617c988e0a 100644
(file)
--- a/
drivers/scsi/scsi.c
+++ b/
drivers/scsi/scsi.c
@@
-128,7
+128,7
@@
const char * scsi_device_type(unsigned type)
return "Well-known LUN ";
if (type == 0x1f)
return "No Device ";
- if (type > ARRAY_SIZE(scsi_device_types))
+ if (type >
=
ARRAY_SIZE(scsi_device_types))
return "Unknown ";
return scsi_device_types[type];
}
This page took
0.025733 seconds
and
5
git commands to generate.