wlan: validate key length passed to wlan_hdd_cfg80211_add_key()

Static source code analysis identified an issue where the key length
being passed to wlan_hdd_cfg80211_add_key() was not being validated.
As a result the operations used to copy the key could result in a
buffer overflow.  To prevent buffer overflow add logic to validate
the key length before using it to copy the key.

Change-Id: I71a86baafc114bd75af3a7c070d831786d9e0d7b
1 file changed
tree: aec088e1b2b0e8b31f2f6802d7b941652c8eb9f2
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig