Colin Ian King a48faebe65 lightnvm: fix out-of-bounds write to array devices->info[]
There is an off-by-one array check that can lead to a out-of-bounds
write to devices->info[i].  Fix this by checking by using >= rather
than > for the size check. Also replace hard-coded array size limit
with ARRAY_SIZE on the array.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: cd9e9808d18f ("lightnvm: Support for Open-Channel SSDs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-10-16 09:28:45 -06:00
..
2018-01-05 08:50:12 -07:00
2019-03-07 08:59:26 -07:00
2019-11-27 07:44:25 +01:00