summaryrefslogtreecommitdiffstats
path: root/src/crypto/x509v3/v3_utl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/x509v3/v3_utl.c')
-rw-r--r--src/crypto/x509v3/v3_utl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto/x509v3/v3_utl.c b/src/crypto/x509v3/v3_utl.c
index 27a91ff..14a2f3b 100644
--- a/src/crypto/x509v3/v3_utl.c
+++ b/src/crypto/x509v3/v3_utl.c
@@ -263,7 +263,10 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line)
/* We are going to modify the line so copy it first */
linebuf = BUF_strdup(line);
if (linebuf == NULL)
+ {
+ OPENSSL_PUT_ERROR(X509V3, X509V3_parse_list, ERR_R_MALLOC_FAILURE);
goto err;
+ }
state = HDR_NAME;
ntmp = NULL;
/* Go through all characters */
@@ -751,7 +754,7 @@ static const unsigned char *valid_star(const unsigned char *p, size_t len,
if (p[i] == '*')
{
int atstart = (state & LABEL_START);
- int atend = (i == len - 1 || p[i+i] == '.');
+ int atend = (i == len - 1 || p[i+1] == '.');
/*
* At most one wildcard per pattern.
* No wildcards in IDNA labels.