Skip to content
Snippets Groups Projects
Commit cc9b2e9f authored by James Bottomley's avatar James Bottomley
Browse files

[SCSI] enclosure: fix oops while iterating enclosure_status array


Based on patch originally by Jeff Mahoney <jeffm@suse.com>

 enclosure_status is expected to be a NULL terminated array of strings
 but isn't actually NULL terminated. When writing an invalid value to
 /sys/class/enclosure/.../.../status, it goes off the end of the array
 and Oopses.


Fix by making the assumption true and adding NULL at the end.

Reported-by: default avatarArtur Wojcik <artur.wojcik@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent c982c368
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment