aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-09-26 07:22:13 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-10-01 16:04:48 -0400
commit80c6e3c0b5eb855b69270658318f5ccf04d7b1ff (patch)
treeb4d707c023e84b5a783057e3538e1b8921d8c5ee /drivers/scsi/scsi.c
parent7b75b990e3cb33fd529640d589e77950e72a607c (diff)
[SCSI] fix scsi_device_types overrun in scsi.c
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>
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 7a054f9d1ee3..a21642e32c42 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -128,7 +128,7 @@ const char * scsi_device_type(unsigned type)
128 return "Well-known LUN "; 128 return "Well-known LUN ";
129 if (type == 0x1f) 129 if (type == 0x1f)
130 return "No Device "; 130 return "No Device ";
131 if (type > ARRAY_SIZE(scsi_device_types)) 131 if (type >= ARRAY_SIZE(scsi_device_types))
132 return "Unknown "; 132 return "Unknown ";
133 return scsi_device_types[type]; 133 return scsi_device_types[type];
134} 134}