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

Commit aa939c12 authored by Christopher N Bednarz's avatar Christopher N Bednarz Committed by Doug Ledford
Browse files

i40iw: Fix potential fcn_id_array out of bounds



Avoid out of bounds error by utilizing I40IW_MAX_STATS_COUNT
instead of I40IW_INVALID_FCN_ID.

Signed-off-by: default avatarChristopher N Bednarz <christoper.n.bednarz@intel.com>
Signed-off-by: default avatarHenry Orosco <henry.orosco@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent a28f047e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4881,7 +4881,7 @@ void i40iw_vsi_stats_free(struct i40iw_sc_vsi *vsi)
{
	u8 fcn_id = vsi->fcn_id;

	if ((vsi->stats_fcn_id_alloc) && (fcn_id != I40IW_INVALID_FCN_ID))
	if (vsi->stats_fcn_id_alloc && fcn_id < I40IW_MAX_STATS_COUNT)
		vsi->dev->fcn_id_array[fcn_id] = false;
	i40iw_hw_stats_stop_timer(vsi);
}