X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FBaseCryptLib%2FPk%2FCryptX509.c;fp=CryptoPkg%2FLibrary%2FBaseCryptLib%2FPk%2FCryptX509.c;h=56e66308ae43337f05acf170a3089bcbaa2b5f84;hp=bf7c4ccd42feb8bb0ca283394d3be9018c5d0ebc;hb=2067d9f8bfdf172a5eab4d1abfe8b4ba8c5195d5;hpb=57d1afc88950401a322e8679bbf89ec57ba8e992 diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c index bf7c4ccd42..56e66308ae 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c @@ -644,8 +644,8 @@ X509GetTBSCert ( ) { CONST UINT8 *Temp; - INTN Asn1Tag; - INTN ObjClass; + UINT32 Asn1Tag; + UINT32 ObjClass; UINTN Length; // @@ -673,7 +673,8 @@ X509GetTBSCert ( // So we can just ASN1-parse the x.509 DER-encoded data. If we strip // the first SEQUENCE, the second SEQUENCE is the TBSCertificate. // - Temp = Cert; + Temp = Cert; + Length = 0; ASN1_get_object (&Temp, (long *)&Length, (int *)&Asn1Tag, (int *)&ObjClass, (long)CertSize); if (Asn1Tag != V_ASN1_SEQUENCE) {