]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: Fix array-bounds warning in fragment copy
authorMatthias Kaehlcke <mka@chromium.org>
Thu, 13 Apr 2017 17:05:04 +0000 (10:05 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Apr 2017 09:02:18 +0000 (11:02 +0200)
commit5a7e508e712d7d3eb51028dd2808a7dd1e412748
tree54de2141081fb66adb12f8583a66dbf9a7ebcac0
parent6d7da649d1e03118614e999d9aba1ef37a881fe4
cfg80211: Fix array-bounds warning in fragment copy

__ieee80211_amsdu_copy_frag intentionally initializes a pointer to
array[-1] to increment it later to valid values. clang rightfully
generates an array-bounds warning on the initialization statement.

Initialize the pointer to array[0] and change the algorithm from
increment before to increment after consume.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c