net: ieee802154: Fix possible null pointer de-reference
ieee802154_scan() checks if ctx->scan_ctx (scan) is NULL what implies that this can be true, but de-reference this variable before this check what may cause a problem. Fixes #23299 [3] Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
841b6ab990
commit
6fec8ea84e
1 changed files with 4 additions and 0 deletions
|
@ -97,6 +97,10 @@ static int ieee802154_scan(u32_t mgmt_request, struct net_if *iface,
|
|||
return -EALREADY;
|
||||
}
|
||||
|
||||
if (scan == NULL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mgmt_request == NET_REQUEST_IEEE802154_ACTIVE_SCAN) {
|
||||
struct ieee802154_frame_params params;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue