commit | a5fe209d71f311afb0035ce39e9472f9b31445e9 | [log] [tgz] |
---|---|---|
author | Li Qiang <liq3ea@163.com> | Thu Jan 03 05:12:51 2019 -0800 |
committer | Marcel Apfelbaum <marcel.apfelbaum@gmail.com> | Sat Jan 19 10:57:48 2019 +0200 |
tree | 0974b7b5373ad6f92c0522e30de422ef931e4ed4 | |
parent | a1aa88b7dcac2b22d74908f9276d5d145d8e65a0 [diff] |
hw: rdma: fix an off-by-one issue In rdma_rm_get_backend_gid_index(), the 'sgid_idx' is used to index the array 'dev_res->port.gid_tbl' which size is MAX_PORT_GIDS. Current the 'sgid_idx' may be MAX_PORT_GIDS thus cause an off-by-one issue. Spotted by Coverity: CID 1398594 Signed-off-by: Li Qiang <liq3ea@163.com> Message-Id: <20190103131251.49271-1-liq3ea@163.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>