mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
Merged revisions 3705 via svnmerge from
https://vlnb@scst.svn.sourceforge.net/svnroot/scst/trunk ........ r3705 | bvassche | 2011-07-21 05:52:21 -0400 (Thu, 21 Jul 2011) | 1 line scst/sysfs: do not access scst_dev_handler_types[] outside its bounds ........ git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2450,7 +2450,7 @@ static ssize_t scst_dev_sysfs_type_show(struct kobject *kobj,
|
||||
dev = container_of(kobj, struct scst_device, dev_kobj);
|
||||
|
||||
pos = sprintf(buf, "%d - %s\n", dev->type,
|
||||
(unsigned)dev->type > ARRAY_SIZE(scst_dev_handler_types) ?
|
||||
(unsigned)dev->type >= ARRAY_SIZE(scst_dev_handler_types) ?
|
||||
"unknown" : scst_dev_handler_types[dev->type]);
|
||||
|
||||
return pos;
|
||||
@@ -4475,7 +4475,7 @@ static ssize_t scst_devt_type_show(struct kobject *kobj,
|
||||
devt = container_of(kobj, struct scst_dev_type, devt_kobj);
|
||||
|
||||
pos = sprintf(buf, "%d - %s\n", devt->type,
|
||||
(unsigned)devt->type > ARRAY_SIZE(scst_dev_handler_types) ?
|
||||
(unsigned)devt->type >= ARRAY_SIZE(scst_dev_handler_types) ?
|
||||
"unknown" : scst_dev_handler_types[devt->type]);
|
||||
|
||||
return pos;
|
||||
|
||||
Reference in New Issue
Block a user