summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_alt.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2005-07-26 21:10:34 +0000
committerNils Larsch <nils@openssl.org>2005-07-26 21:10:34 +0000
commitc755c5fd8ba5771691451e9d1b163544fdadb7ec (patch)
treee9ba80b2ad6965f3803a0d2273b8797258023586 /crypto/x509v3/v3_alt.c
parent5c8e9139d18ca20fd4a6f194697d2e2634009cca (diff)
improved error checking and some fixes
PR: 1170 Submitted by: Yair Elharrar Reviewed and edited by: Nils Larsch
Diffstat (limited to 'crypto/x509v3/v3_alt.c')
-rw-r--r--crypto/x509v3/v3_alt.c3
1 files changed, 2 insertions, 1 deletions
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;