]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg: BaseCryptLib fix incorrect param order edk2-stable202108
authorStewart, Chris (SW Architect) via groups.io <chris.stewart=hp.com@groups.io>
Tue, 17 Aug 2021 12:47:44 +0000 (20:47 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 24 Aug 2021 00:35:06 +0000 (00:35 +0000)
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>
CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c

index ff7f6488f23e88867bc4691b0dbf4b0c680f92f5..970e9b94a0714e8002ba75d650444745b69b394f 100644 (file)
@@ -155,7 +155,7 @@ ConvertAsn1TimeToEfiTime (
   }\r
 \r
   Str = (CONST CHAR8*)Asn1Time->data;\r
-  SetMem (EfiTime, 0, sizeof (EFI_TIME));\r
+  SetMem (EfiTime, sizeof (EFI_TIME), 0);\r
 \r
   Index = 0;\r
   if (Asn1Time->type == V_ASN1_UTCTIME) {               /* two digit year */\r