Re: [PATCH] lightnvm: fix out-of-bounds write to array devices->info[]

2020-10-16 Thread Jens Axboe
On 10/16/20 8:33 AM, Colin King wrote: > From: Colin Ian King > > 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 th

[PATCH] lightnvm: fix out-of-bounds write to array devices->info[]

2020-10-16 Thread Colin King
From: Colin Ian King 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