Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
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
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment