cryptodev: fix missing device id range checking
cryptodev: fix missing device id range checking

This patch adds range-checking of the device id passed from
the user app code. It prevents out-of-range array accesses
which in some situations resulted in an
application crash (segfault).

Fixes: 3dd4435cf473 ("cryptodev: fix checks related to device id")
Cc: stable@dpdk.org

Signed-off-by: Adam Dybkowski <b636839fd6da8c90d3d28fcb76555ed5d2c5a673@intel.com>
Acked-by: Fiona Trahe <7ba562cc372916cd557d0be347608f8b4da4f746@intel.com>
Acked-by: Akhil Goyal <74d7c4c993a22c1d4f60c46ff3d95c969a24a25c@nxp.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk