[source] mac80211: brcmfmac: don't use uninitialize mem for country codes

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 24 07:59:30 PST 2017


rmilecki pushed a commit to source.git, branch master:
https://git.lede-project.org/4376e69473ef6df7ecef0996947ade588c5e8504

commit 4376e69473ef6df7ecef0996947ade588c5e8504
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Tue Jan 24 16:54:09 2017 +0100

    mac80211: brcmfmac: don't use uninitialize mem for country codes
    
    There was a bug in brcmfmac patch that could result in treating random
    memory as source of country codes.
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 .../863-brcmfmac-add-in-driver-tables-with-country-codes.patch        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch b/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch
index b7d6aec..e7551c3 100644
--- a/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch
+++ b/package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch
@@ -24,8 +24,8 @@ Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
 +		{ "JP", "JP", 78 },
 +		{ "US", "Q2", 86 },
 +	};
-+	struct brcmfmac_pd_cc_entry *cc_ent;
-+	int table_size;
++	struct brcmfmac_pd_cc_entry *cc_ent = NULL;
++	int table_size = 0;
 +
 +	if (of_machine_is_compatible("netgear,r8000")) {
 +		cc_ent = netgear_r8000_cc_ent;



More information about the lede-commits mailing list