summaryrefslogtreecommitdiff
path: root/CryptoPkg/Library
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-07-10 09:24:53 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-12 08:53:19 +0800
commit07cae0659795b4d6b59f67eabb8426c7c7742318 (patch)
tree1ed1833eacd9fe3a4e088f9461a088ca7dde1c4c /CryptoPkg/Library
parent8824c6144c73fe4b6355df6dfaee3e80e068c3b1 (diff)
downloadedk2-07cae0659795b4d6b59f67eabb8426c7c7742318.zip
edk2-07cae0659795b4d6b59f67eabb8426c7c7742318.tar.gz
edk2-07cae0659795b4d6b59f67eabb8426c7c7742318.tar.bz2
CryptoPkg BaseCryptLib: Init the content of struct 'CertCtx' before use
Some fields in structure 'CertCtx' might be used uninitialized in function Pkcs7GetCertificatesList(). This commit makes sure that 'CertCtx' gets initialized before being used. Cc: Long Qin <qin.long@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
Diffstat (limited to 'CryptoPkg/Library')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
index 559610d..efa3796 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
@@ -10,7 +10,7 @@
WrapPkcs7Data(), Pkcs7GetSigners(), Pkcs7Verify() will get UEFI Authenticated
Variable and will do basic check for data structure.
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -489,6 +489,8 @@ Pkcs7GetCertificatesList (
OldBuf = NULL;
Signers = NULL;
+ ZeroMem (&CertCtx, sizeof (CertCtx));
+
//
// Parameter Checking
//