[aes-ccm] add lower-bound check for tag length (#2008)

This commit is contained in:
Jonathan Hui
2017-07-18 08:32:36 -07:00
committed by GitHub
parent 5ba896266c
commit 702ec2551f
7 changed files with 36 additions and 78 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ void otCryptoAesCcm(
assert((aKey != NULL) && (aNonce != NULL) && (aPlainText != NULL) && (aCipherText != NULL) && (aTag != NULL));
SuccessOrExit(aesCcm.SetKey(aKey, aKeyLength));
aesCcm.Init(aHeaderLength, aLength, aTagLength, aNonce, aNonceLength);
SuccessOrExit(aesCcm.Init(aHeaderLength, aLength, aTagLength, aNonce, aNonceLength));
if (aHeaderLength != 0)
{