qcacld-3.0: Fix out of bound access in sta_to_adapter

Array sta_to_adapter of hdd_ctx is accessed from several functions of
NAN and softap without bound check which can lead to out of bound read
or write access.

To fix this, add range check for sta_id.

Change-Id: I0b8c4e8bce26c6514df489c3305000691c7e1fe0
CRs-Fixed: 2456954
3 files changed