scst, procfs: Fix a potential out-of-range array access (merge r4555 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4580 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2012-11-03 14:12:45 +00:00
parent 48f5401f55
commit 5b106ecf63
+1 -1
View File
@@ -2386,7 +2386,7 @@ static int scst_dev_handler_type_info_show(struct seq_file *seq, void *v)
TRACE_ENTRY();
seq_printf(seq, "%d - %s\n", dev_type->type,
dev_type->type > (int)ARRAY_SIZE(scst_proc_dev_handler_type)
dev_type->type >= (int)ARRAY_SIZE(scst_proc_dev_handler_type)
? "unknown" : scst_proc_dev_handler_type[dev_type->type]);
TRACE_EXIT();