summaryrefslogtreecommitdiff
path: root/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c
index 9a317ec143..27526bcd40 100644
--- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c
@@ -83,6 +83,12 @@ Sha1Duplicate (
OUT VOID *NewSha1Context
)
{
+ //
+ // ASSERT if Sha1Context or NewSha1Context is NULL.
+ //
+ ASSERT (Sha1Context != NULL);
+ ASSERT (NewSha1Context != NULL);
+
CopyMem (NewSha1Context, Sha1Context, sizeof (SHA_CTX));
return TRUE;