qed: off by one in qed_parse_mcp_trace_buf()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jul 2018 09:52:36 +0000 (12:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:07:00 +0000 (13:07 +0200)
commit412a5ef3396406d1312d4494c7dffce9687f5259
tree8602cd38bbf42afa2180436515c1009f3e9fbc14
parent8ce651857bd71601f0bbe46c0179678613e60729
qed: off by one in qed_parse_mcp_trace_buf()

[ Upstream commit 0df8adbb88db8283f102a2afa91610a502245cb2 ]

If format_idx == s_mcp_trace_meta.formats_num then we read one element
beyond the end of the s_mcp_trace_meta.formats[] array.

Fixes: 50bc60cb155c ("qed*: Utilize FW 8.33.11.0")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/qed/qed_debug.c