projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.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
|
history
diff --git
a/drivers/scsi/scsi.c
b/drivers/scsi/scsi.c
index
7a054f9
..
a21642e
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];
}