diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-08-29 19:44:18 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-31 02:46:51 +0000 |
commit | 90d861f63d0fe467cec9659703f02d3d32969dc3 (patch) | |
tree | 6a8c8eb18f2a674e3371568798c5100107fa76bd /CryptoPkg | |
parent | 468a36b22f0ac61b1f4def70ebbb98949def161d (diff) | |
download | edk2-90d861f63d0fe467cec9659703f02d3d32969dc3.tar.gz edk2-90d861f63d0fe467cec9659703f02d3d32969dc3.tar.bz2 edk2-90d861f63d0fe467cec9659703f02d3d32969dc3.zip |
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>
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Sign.c | 1 | ||||
-rw-r--r-- | CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptTs.c | 15 |
2 files changed, 8 insertions, 8 deletions
diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Sign.c b/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Sign.c index e3283dad48..6caed97c94 100644 --- a/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Sign.c +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptPkcs7Sign.c @@ -486,6 +486,7 @@ Pkcs7Sign ( return FALSE;
}
+ Buffer = NULL;
BufferSize = 4096;
SignatureLen = MAX_SIGNATURE_SIZE;
diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptTs.c b/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptTs.c index d3fa205f9c..d7a07836bb 100644 --- a/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptTs.c +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptTs.c @@ -118,12 +118,11 @@ ImageTimestampVerify ( OUT EFI_TIME *SigningTime
)
{
- BOOLEAN Status;
- UINT8 *Ptr;
- UINT8 *End;
- INT32 Len;
- UINTN ObjLen;
- UINT8 *TempPtr;
+ UINT8 *Ptr;
+ UINT8 *End;
+ INT32 Len;
+ UINTN ObjLen;
+ UINT8 *TempPtr;
//
// Initializations
@@ -374,8 +373,8 @@ ImageTimestampVerify ( //
if (SigningTime != NULL) {
SetMem (SigningTime, sizeof (EFI_TIME), 0);
- Status = ConvertAsn1TimeToEfiTime (Ptr, SigningTime);
+ return ConvertAsn1TimeToEfiTime (Ptr, SigningTime);
}
- return Status;
+ return TRUE;
}
|