]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix potential out of bound array access
authorSudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Wed, 7 Jun 2017 09:43:05 +0000 (05:43 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 21 Jun 2017 01:17:10 +0000 (18:17 -0700)
commitd1f904bf9115722fdd821555310ca03dcbe1e0e6
treeb13bdf997f13df0f0f0722d8e55166652bab3740
parent48a2f97d28ff7d44d9d3cf8937b70d7c5986ad9a
i40e: Fix potential out of bound array access

This is a fix for the static code analysis issue where dcbcfg->numapps
could be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]).
The fix makes sure that the array is not accessed past the size of
of the array (i.e. I40E_DCBX_MAX_APPS).

Copyright updated to 2017.

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_dcb.c