diff options
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c index 0298b80cc5..ff9377c0d2 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c +++ b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha1.c @@ -89,6 +89,12 @@ HmacSha1Duplicate ( OUT VOID *NewHmacSha1Context
)
{
+ //
+ // ASSERT if HmacSha1Context or NewHmacSha1Context is NULL.
+ //
+ ASSERT (HmacSha1Context != NULL);
+ ASSERT (NewHmacSha1Context != NULL);
+
CopyMem (NewHmacSha1Context, HmacSha1Context, sizeof (HMAC_CTX));
return TRUE;
|