bcmdhd: Add checks for stack buffer overflows

These two checks prevent exploitable buffer overflows in two scenarios.
1. Long WPS_ID_DEVICE_NAME in WPS info elements
2. Invalid SSID determined in certain scan results

Bug: 27335848

[fixes CVE-2016-0801]
Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: I755543d84770be58ef2467745d5d2b55682a126a
1 file changed