From: Larry Finger Date: Mon, 10 Mar 2014 23:53:10 +0000 (-0500) Subject: rtlwifi: rtl8723be: Fix array dimension problems X-Git-Tag: v3.15-rc1~113^2~159^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e3b3bcd81776527fa6f11624d68849de8c8802e;p=pandora-kernel.git rtlwifi: rtl8723be: Fix array dimension problems Commit a619d1abe20c leads to the following static checker warning: drivers/net/wireless/rtlwifi/rtl8723be/phy.c:667 _rtl8723be_store_tx_power_by_rate() error: buffer overflow 'rtlphy->tx_power_by_rate_offset[band]' 4 <= 5 This warning arises because the code is testing the indices for the wrong maximum values. In addition, the tests merely putput a warning, and then procedes to corrupt memory. With this change, any such invalid memory access is avoided. Signed-off-by: Larry Finger Reported-by: Dan Carpenter Signed-off-by: John W. Linville --- Reading git-diff-tree failed