diff options
author | Stewart, Chris (SW Architect) via groups.io <chris.stewart=hp.com@groups.io> | 2021-08-17 20:47:44 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-08-24 00:35:06 +0000 |
commit | 7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5 (patch) | |
tree | b6d41175b003c72eddaf09982012713149054718 /CryptoPkg | |
parent | 8dd4fc5be6189666b37e5b00131a4173c6a2b085 (diff) | |
download | edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.bz2 edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.zip |
CryptoPkg: BaseCryptLib fix incorrect param orderedk2-stable202108
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3550
Function ConvertAsn1TimeToEfiTime initializes timestamp to zeroes with
SetMem, but the actual parameters are out of order. The result is
the SetMem operation has no effect. The fix is to put the actual
parameters in the correct order.
Signed-off-by: Chris Stewart <chris.stewart@hp.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c index ff7f6488f2..970e9b94a0 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c @@ -155,7 +155,7 @@ ConvertAsn1TimeToEfiTime ( }
Str = (CONST CHAR8*)Asn1Time->data;
- SetMem (EfiTime, 0, sizeof (EFI_TIME));
+ SetMem (EfiTime, sizeof (EFI_TIME), 0);
Index = 0;
if (Asn1Time->type == V_ASN1_UTCTIME) { /* two digit year */
|