From 952bd2291872b5e2d302f8de1349239bfbd0332c Mon Sep 17 00:00:00 2001 From: Qin Long Date: Fri, 19 Jun 2015 02:46:51 +0000 Subject: CryptoPkg: Add some comments for API usage clarification. This patch adds some comments for API usage clarification, and adds one object initialization in X509ConstructCertificateStack implementation to fix possible memory release issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long Reviewed-by: Ting Ye git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17671 6f19259b-4bc3-4df7-8a09-765794883524 --- CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c') diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c index 02851d5701..70b135a754 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c @@ -67,7 +67,7 @@ X509ConstructCertificate ( If X509Stack is NULL, then return FALSE. - @param[in, out] X509Stack On input, pointer to an existing X509 stack object. + @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object. On output, pointer to the X509 stack object with new inserted X509 certificate. @param ... A list of DER-encoded single certificate data followed @@ -132,6 +132,7 @@ X509ConstructCertificateStack ( // // Construct X509 Object from the given DER-encoded certificate data. // + X509Cert = NULL; Status = X509ConstructCertificate ( (CONST UINT8 *) Cert, CertSize, -- cgit v1.2.3