examples/l2fwd-crypto: fix stats array length
authorSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Thu, 30 Jun 2016 09:05:34 +0000 (11:05 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 11 Jul 2016 15:21:21 +0000 (17:21 +0200)
commit572f0779c2dc88c3c225fc06ff5d062f6f425c31
treee8927c5808eacf3ddd200064a2f580348327971a
parent268ca73585ea84207fc0505e0db1ab97099ffa07
examples/l2fwd-crypto: fix stats array length

crypto_statistics array was not big enough for storing
all the possible crypto device statistics, as its size was
RTE_MAX_ETHPORTS, but should be RTE_CRYPTO_MAX_DEVS, leading
this to a potential out-of-bounds issue.

Coverity issue: 120145
Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
examples/l2fwd-crypto/main.c