mac80211: brcmfmac: don't use uninitialize mem for country codes
authorRafał Miłecki <rafal@milecki.pl>
Tue, 24 Jan 2017 15:54:09 +0000 (16:54 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 24 Jan 2017 15:55:21 +0000 (16:55 +0100)
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@milecki.pl>
package/kernel/mac80211/patches/863-brcmfmac-add-in-driver-tables-with-country-codes.patch

index b7d6aec29aa234b36d4002009aa0a02dd39b6f73..e7551c3a70368da98794e4d73869199c3d59e4dc 100644 (file)
@@ -24,8 +24,8 @@ Signed-off-by: Rafał Miłecki <rafal@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;