+1
−1
Loading
This patch fixes issue detected by Coverity scan. The spdk_scsi_task_names table is accessed using 'task->function' as an index. Earlier check allows the 'task->function' to be equal to SPDK_COUNTOF(spdk_scsi_task_names), while the table can only be accessed using indexes from 0..(SPDK_COUNTOF()-1) range. The 'if' statement needs to be modified to reject index equal to SPDK_COUNTOF(spdk_scsi_task_names) Change-Id: I569ea530cee3721a085ddd8c7f90dd7761d644be Signed-off-by:Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20932 Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot