wifi: iwlwifi: mvm: don't access packet before checking len
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Mon, 5 Dec 2022 08:35:40 +0000 (10:35 +0200)
committerGregory Greenman <gregory.greenman@intel.com>
Wed, 7 Dec 2022 15:35:58 +0000 (17:35 +0200)
commit1174e8fcbba89593f67240c3395554b3812a4981
treeed6fb8809bc107692dd1d096aaeec5ee0ce0922c
parentc5a976cf6a756efeee190f05c875b732bd10b4df
wifi: iwlwifi: mvm: don't access packet before checking len

Currently in sniffer mode we access pkt fields before checking that
the frame has the length to access it. Fix this by moving the check
to before the access.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20221205102808.934da230c698.Ib56f11bbc8978e15d38394336a929cb4996ba39e@changeid
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c