hw/rdma: Fix possible out of bounds access to GID table
commitc387e8a4ecee76479f4b83b58e2e8ab854ef74ee
authorYuval Shaia <yuval.shaia@oracle.com>
Mon, 30 Apr 2018 20:02:20 +0000 (30 23:02 +0300)
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Thu, 3 May 2018 17:52:29 +0000 (3 20:52 +0300)
treebcbebea63cdb7999efc51c5a57823d88c99c1fd5
parentb9e34872b95af26076e2b456fd1c3e9dd65f3b19
hw/rdma: Fix possible out of bounds access to GID table

Array size is MAX_PORT_GIDS, let's make sure the given index is in
range.

While there limit device table size to 1.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Message-Id: <20180430200223.4119-5-marcel.apfelbaum@gmail.com>
hw/rdma/rdma_rm_defs.h
hw/rdma/vmw/pvrdma_cmd.c