FROMLIST: mwifiex: printk() overflow with 32-byte SSIDs

SSIDs aren't guaranteed to be 0-terminated. Let's cap the max length
when we print them out.

This can be easily noticed by connecting to a network with a 32-octet
SSID:

[ 3903.502925] mwifiex_pcie 0000:01:00.0: info: trying to associate to
'0123456789abcdef0123456789abcdef <uninitialized mem>' bssid
xx:xx:xx:xx:xx:xx

Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Cc: <stable@vger.kernel.org>
(am from https://patchwork.kernel.org/patch/9418367/)

BUG=chromium:663604
TEST=connect to Wifi network with SSID
     '0123456789abcdef0123456789abcdef'

Conflicts:
	drivers/net/wireless/mwifiex/cfg80211.c

Change-Id: If68987bd62f1abea9d752bd7fd4c2a49d82d19a9
Reviewed-on: https://chromium-review.googlesource.com/409592
Commit-Ready: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
(cherry picked from commit a6b9fa0604ab6352a85be53bd5509854b83ecd66)
Reviewed-on: https://chromium-review.googlesource.com/410185
Reviewed-by: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
2 files changed