CryptoPkg/BaseCryptLibMbedTls: Fix uninitialized variable errors

Clang complains about a couple of variables potentially being
uninitialized, and those complaints seem to be valid.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel 2024-08-29 19:44:18 +02:00 committed by mergify[bot]
parent 468a36b22f
commit 90d861f63d
2 changed files with 8 additions and 8 deletions

View File

@ -486,6 +486,7 @@ Pkcs7Sign (
return FALSE; return FALSE;
} }
Buffer = NULL;
BufferSize = 4096; BufferSize = 4096;
SignatureLen = MAX_SIGNATURE_SIZE; SignatureLen = MAX_SIGNATURE_SIZE;

View File

@ -118,12 +118,11 @@ ImageTimestampVerify (
OUT EFI_TIME *SigningTime OUT EFI_TIME *SigningTime
) )
{ {
BOOLEAN Status; UINT8 *Ptr;
UINT8 *Ptr; UINT8 *End;
UINT8 *End; INT32 Len;
INT32 Len; UINTN ObjLen;
UINTN ObjLen; UINT8 *TempPtr;
UINT8 *TempPtr;
// //
// Initializations // Initializations
@ -374,8 +373,8 @@ ImageTimestampVerify (
// //
if (SigningTime != NULL) { if (SigningTime != NULL) {
SetMem (SigningTime, sizeof (EFI_TIME), 0); SetMem (SigningTime, sizeof (EFI_TIME), 0);
Status = ConvertAsn1TimeToEfiTime (Ptr, SigningTime); return ConvertAsn1TimeToEfiTime (Ptr, SigningTime);
} }
return Status; return TRUE;
} }