]> git.baikalelectronics.ru Git - kernel.git/commit
regulatory: don't write past array when intersecting rules
authorJohannes Berg <johannes.berg@intel.com>
Thu, 6 Dec 2012 16:03:17 +0000 (17:03 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 3 Jan 2013 12:01:18 +0000 (13:01 +0100)
commitb15b39b965924967f7a785bfc49326aec29fdcbb
treeaaadc945f5f5c72bd63fe1bbe2d39d0c9eec3ee1
parent3b872db39de7ab0e609ae231924c4e30c08cd63c
regulatory: don't write past array when intersecting rules

When intersecting rules, we count first to know how many
rules need to be allocated, and then do the intersection
into the allocated array. However, the code doing this
writes past the end of the array because it attempts to
do all intersections. Make it stop when the right number
of rules has been reached.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c