fix static analysis warning, g++ compile warning

This commit is contained in:
John Safranek
2014-02-07 14:52:44 -08:00
parent 594feec68b
commit f1c2250652
2 changed files with 4 additions and 3 deletions

View File

@@ -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)

View File

@@ -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';