staging: r8188eu: fix the index check in mgt_dispatcher
In mgt_dispatcher, we check that index is a valid index for the mlme_sta_tbl array. The valid indices for this array are from 0 to ARRAY_SIZE(mlme_sta_tbl) - 1. An invalid index is >= ARRAY_SIZE(mlme_sta_tbl). Fix the off by one error in the check. Fixes: db84803c ("staging: r8188eu: use ARRAY_SIZE for mlme_sta_tbl") Reported-by:Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220422140958.239767-1-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment