Merge pull request #2390 from dgarske/altname

Fix for scan-build warning with altName->name possible use of NULL
This commit is contained in:
toddouska 2019-08-02 15:49:13 -07:00 committed by GitHub
commit c34657b20f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8495,8 +8495,10 @@ static int CheckForAltNames(DecodedCert* dCert, char* domain, int* checkCN)
break;
}
/* No matches and wild pattern match failed. */
else if (altName->name[0] == '*' && match == 0)
else if (altName->name && altName->len >=1 &&
altName->name[0] == '*' && match == 0) {
match = -1;
}
altName = altName->next;
}