vfio: fix array bounds check
authorAlejandro Lucero <alejandro.lucero@netronome.com>
Fri, 12 May 2017 10:18:25 +0000 (11:18 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 5 Jun 2017 19:02:56 +0000 (21:02 +0200)
commit4af00fb1a2449f23a7c0fc32159207ae68b0fbbb
tree2a6c97dfbec279b8fa460326ab337bd78052a0e4
parent06e81dc9b79ae196f44ecc64eeb9a70234137cad
vfio: fix array bounds check

Checking against VFIO_MAX_GROUPS goes beyond the maximum array
index which should be (VFIO_MAX_GROUPS - 1).

Coverity issue: 144555, 144556, 144557
Fixes: 94c0776b1bad ("support hotplug")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal_vfio.c