]> www.infradead.org Git - users/jedix/linux-maple.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)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:24 +0000 (14:15 -0700)
commit1c4e160aef0f88bc0ff3680b55f932cb69d0ee30
treea9d086d79fce521aec8642d07d88b05e0094a884
parentcc3948e193feb60ee5a3b7bc0d31be72bc61c69a
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>
Orabug: 26785018
(cherry picked from commit 1e99854715c79b3e2ebe09d80006aaff0f5c2335)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_dcb.c