const char *emlptr;
const char *emlat;
char ulabel[256];
- size_t size = sizeof(ulabel) - 1;
+ size_t size = sizeof(ulabel);
int ret = X509_V_OK;
size_t emlhostlen;
goto end;
}
- memset(ulabel, 0, sizeof(ulabel));
/* Special case: initial '.' is RHS match */
if (*baseptr == '.') {
ulabel[0] = '.';
- size -= 1;
- if (ossl_a2ulabel(baseptr, ulabel + 1, &size) <= 0) {
+ if (ossl_a2ulabel(baseptr, ulabel + 1, size - 1) <= 0) {
ret = X509_V_ERR_UNSPECIFIED;
goto end;
}
if ((size_t)eml->length > strlen(ulabel)) {
- emlptr += eml->length - (strlen(ulabel));
+ emlptr += eml->length - strlen(ulabel);
/* X509_V_OK */
if (ia5ncasecmp(ulabel, emlptr, strlen(ulabel)) == 0)
goto end;
goto end;
}
- if (ossl_a2ulabel(baseptr, ulabel, &size) <= 0) {
+ if (ossl_a2ulabel(baseptr, ulabel, size) <= 0) {
ret = X509_V_ERR_UNSPECIFIED;
goto end;
}