aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_alt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509v3/v3_alt.c')
-rw-r--r--crypto/x509v3/v3_alt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index 22ec202846ec..7f1e71dd1a42 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -573,6 +573,8 @@ static int do_othername(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx)
return 0;
objlen = p - value;
objtmp = OPENSSL_malloc(objlen + 1);
+ if (objtmp == NULL)
+ return 0;
strncpy(objtmp, value, objlen);
objtmp[objlen] = 0;
gen->d.otherName->type_id = OBJ_txt2obj(objtmp, 0);