mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Merge "crypto: Fix possible stack out of bound error"
This commit is contained in:
commit
e3bf003c8b
1 changed files with 5 additions and 0 deletions
|
|
@ -840,6 +840,11 @@ static int _ce_setup_cipher(struct qce_device *pce_dev, struct qce_req *creq,
|
|||
switch (creq->alg) {
|
||||
case CIPHER_ALG_DES:
|
||||
if (creq->mode != QCE_MODE_ECB) {
|
||||
if (ivsize > MAX_IV_LENGTH) {
|
||||
pr_err("%s: error: Invalid length parameter\n",
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
_byte_stream_to_net_words(enciv32, creq->iv, ivsize);
|
||||
pce = cmdlistinfo->encr_cntr_iv;
|
||||
pce->data = enciv32[0];
|
||||
|
|
|
|||
Loading…
Reference in a new issue