Fix for scan-build warning with altName->name possible use of NULL pointer.

This commit is contained in:
David Garske
2019-08-01 11:54:28 -07:00
parent 50fbdb961f
commit fb8fc4d800

View File

@ -8424,8 +8424,10 @@ static int CheckForAltNames(DecodedCert* dCert, char* domain, int* checkCN)
break; break;
} }
/* No matches and wild pattern match failed. */ /* 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; match = -1;
}
altName = altName->next; altName = altName->next;
} }