X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fx509v3%2Fv3_alt.c;h=b38b3dbfe62baffd7a4c8e956e4e16442f886f59;hp=e3a19bf8a497c2ec9c47cffd4ffc94ed51ea068a;hb=c755c5fd8ba5771691451e9d1b163544fdadb7ec;hpb=5c8e9139d18ca20fd4a6f194697d2e2634009cca diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index e3a19bf8a4..b38b3dbfe6 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -341,7 +341,8 @@ static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p) X509_NAME_ENTRY *ne; GENERAL_NAME *gen = NULL; int i; - if(ctx->flags == CTX_TEST) return 1; + if(ctx != NULL && ctx->flags == CTX_TEST) + return 1; if(!ctx || (!ctx->subject_cert && !ctx->subject_req)) { X509V3err(X509V3_F_COPY_EMAIL,X509V3_R_NO_SUBJECT_DETAILS); goto err;