qcacld-3.0: Avoid out of bounds access in testmode_cmd

While processing cfg80211 callback testmode_cmd(), size of vendor
attribute TM_ATTR_DATA is not validated against the maximum length
but type casted to the internally defined structure pmo_lphb_req.
This can lead to out of bounds access if the size of attr is less than
size of pmo_lphb_req.

To address this, validate size of TM_ATTR_DATA.

Change-Id: I83b18d0935ebc6139644c02a9e51ef25a12b9176
CRs-Fixed: 2411653
1 file changed