crypto/qat: fix possible out-of-bounds
authorFiona Trahe <fiona.trahe@intel.com>
Mon, 3 Jul 2017 15:24:27 +0000 (16:24 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 6 Jul 2017 20:34:55 +0000 (22:34 +0200)
commit5f95f662e13d91e98b3a7243c03e98ab39240bc4
tree653849d1ede1e82363f39075b72960409964438e
parentbb59dac7b37dfd250a297a264a21cf4bea2516ab
crypto/qat: fix possible out-of-bounds

Out-of-bounds access possible if ctx.qat_cipher_alg has invalid value.
This should never happen at this point on data path, but fix for safety.

Coverity issue: 143458, 143465

Fixes: d18ab45f7654 ("crypto/qat: support DOCSIS BPI mode")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
drivers/crypto/qat/qat_crypto.c