diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index 1e7d0e5a0..bf6811375 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -3418,7 +3418,8 @@ int ParseCert(DecodedCert* cert, int type, int verify, void* cm) cert->subjectCNStored = 1; } - if (cert->keyOID == RSAk && cert->pubKeySize > 0) { + if (cert->keyOID == RSAk && + cert->publicKey != NULL && cert->pubKeySize > 0) { ptr = (char*) XMALLOC(cert->pubKeySize, cert->heap, DYNAMIC_TYPE_PUBLIC_KEY); if (ptr == NULL) diff --git a/tests/suites.c b/tests/suites.c index 72e23e1ba..4df5a469b 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -80,8 +80,8 @@ static int IsValidCipherSuite(const char* line, char* suite) int valid = 0; const char* find = "-l "; - char* begin = strstr(line, find); - char* end; + const char* begin = strstr(line, find); + const char* end; suite[0] = '\0';