audk/CryptoPkg/Library/BaseCryptLib
Michael Kubacki 84d77d9bf5 CryptoPkg: Fix conditionally uninitialized variable
Fixes CodeQL alerts for CWE-457:
https://cwe.mitre.org/data/definitions/457.html

Checks the return value from `ASN1_get_object()` to verify values
set by the function are valid.

Note that the function returns literal `0x80`:
    `return (0x80);`

That is used to check the return value is as the case in other areas
of the code.

Cc: Erich McMillan <emcmillan@microsoft.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Co-authored-by: Erich McMillan <emcmillan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
2023-04-03 15:29:08 +00:00
..
Bn CryptoPkg: Add BigNum support 2022-09-23 10:08:24 +00:00
Cipher CryptoPkg: add AeadAesGcm support. 2022-09-23 08:24:42 +00:00
Hash CryptoPkg/BaseCryptLib: avoid using SHA512() 2023-03-07 09:59:50 +00:00
Hmac CryptoPkg/Library/BaseCryptLib: Update internal functions/variables 2022-10-24 07:49:43 +00:00
Kdf CryptoPkg/Library/BaseCryptLib: Update internal functions/variables 2022-10-24 07:49:43 +00:00
Pem CryptoPkg/Library: Cleanup BaseCryptLib and TlsLib 2022-10-24 07:49:43 +00:00
Pk CryptoPkg: Fix conditionally uninitialized variable 2023-04-03 15:29:08 +00:00
Rand CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SysCall CryptoPkg/BaseCryptLib:time overflow 2022-12-03 09:01:38 +00:00
BaseCryptLib.inf CryptPkg: Enable CryptoPkg BaseCryptLib ParallelHash for PEI and DXE 2022-12-02 14:12:51 +00:00
BaseCryptLib.uni CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format 2022-10-24 07:49:43 +00:00
InternalCryptLib.h CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiCryptLib.inf CryptoPkg: Need to enable crypto functions 2022-12-20 01:39:32 +00:00
PeiCryptLib.uni CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format 2022-10-24 07:49:43 +00:00
RuntimeCryptLib.inf CryptoPkg/Library: Cleanup BaseCryptLib and TlsLib 2022-10-24 07:49:43 +00:00
RuntimeCryptLib.uni CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format 2022-10-24 07:49:43 +00:00
SecCryptLib.inf CryptoPkg/Library: Cleanup BaseCryptLib and TlsLib 2022-10-24 07:49:43 +00:00
SecCryptLib.uni CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format 2022-10-24 07:49:43 +00:00
SmmCryptLib.inf CryptoPkg/Library: Reinstate ARM/AARCH64 sections in SmmCryptLib.inf 2023-01-26 08:59:29 +00:00
SmmCryptLib.uni CryptoPkg/Library/BaseCryptLib: Add missing UNI file and fix format 2022-10-24 07:49:43 +00:00
UnitTestHostBaseCryptLib.inf CryptoPkg: Fixed host-based unit tests 2022-10-24 07:49:43 +00:00