X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FBaseCryptLib%2FHash%2FCryptMd5.c;h=8d5e6ed89d106ad0b642be5af31b118898f80b36;hp=73f3d219b01e889856ed8eb07c362b97525649f5;hb=4a567c9690db97ecbf982e9428727f073bada504;hpb=a8c4464502aabcbda7032daddc772a1bc7386bdf diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c b/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c index 73f3d219b0..8d5e6ed89d 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c +++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptMd5.c @@ -84,6 +84,12 @@ Md5Duplicate ( OUT VOID *NewMd5Context ) { + // + // ASSERT if Md5Context or NewMd5Context is NULL. + // + ASSERT (Md5Context != NULL); + ASSERT (NewMd5Context != NULL); + CopyMem (NewMd5Context, Md5Context, sizeof (MD5_CTX)); return TRUE;