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:
makejian 2023-06-13 16:19:38 +08:00 committed by Xiang Xiao
parent a5dc00f941
commit 5e0e027880

View File

@ -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;