]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: fw: make pos static in iwl_sar_get_ewrd_table() loop
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 23 Dec 2019 11:00:59 +0000 (13:00 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 23 Dec 2019 23:34:52 +0000 (01:34 +0200)
commite8394e2995fcc1ea1e29e45da5f4562fa0408bc2
treea1f567c234508184bc8fe855c1336c70782fc555
parent9620a4f67ebcdba7fa234a3a2b32724d136280a8
iwlwifi: fw: make pos static in iwl_sar_get_ewrd_table() loop

In the for loop where we are supposed to go through the entire table,
we are using a non-static local to keep the pos index.  This makes
each iteration start with 3, so we always access the first item on the
table.  Fix this by moving the variable outside of the loo so it
doesn't lose its value at every iteration.

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Fixes: 54243f2f70ad ("iwlwifi: mvm: fix an out-of-bound access")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/acpi.c