From: Amitkumar Karwar Date: Tue, 22 Oct 2013 22:24:45 +0000 (-0700) Subject: mwifiex: fix invalid memory access in mwifiex_ret_tx_rate_cfg() X-Git-Tag: v3.13-rc1~33^2~27^2^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2636c308fd720137d719c91da95adca2cd8f1c51;p=pandora-kernel.git mwifiex: fix invalid memory access in mwifiex_ret_tx_rate_cfg() As tlv_buf_len is decremented at the end of the loop, we may have accessed invalid memory in the last iteration. Modify the while condition and add a break statement at the begining of the loop to fix the problem. Reported-by: Dan Carpenter Signed-off-by: Amitkumar Karwar Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- Reading git-diff-tree failed