Skip to content
Commit 251fe09f authored by Dan Carpenter's avatar Dan Carpenter Committed by Luca Coelho
Browse files

iwlwifi: mvm: writing zero bytes to debugfs causes a crash



This is a static analysis fix.  The warning is:

	drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c:912 iwl_mvm_fw_dbg_collect()
	warn: integer overflows 'sizeof(*desc) + len'

I guess this code is supposed to take a NUL character, but if we write
zero bytes then it tries to write -1 characters and crashes.

Fixes: c91b865c ("iwlwifi: mvm: support description for user triggered fw dbg collection")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent a9560029
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment