crypto: memory requested by asymmetric encryption is not initialized
Using uninitialized memory for output parameters is at risk of error in asymmetric encryption process Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
parent
a5dc00f941
commit
5e0e027880
@ -658,7 +658,7 @@ int cryptodev_key(FAR struct crypt_kop *kop)
|
||||
continue;
|
||||
}
|
||||
|
||||
krp->krp_param[i].crp_p = kmm_malloc(size);
|
||||
krp->krp_param[i].crp_p = kmm_zalloc(size);
|
||||
if (i >= krp->krp_iparams)
|
||||
{
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user