summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/t_x509.c
diff options
context:
space:
mode:
authormiod <>2014-07-12 16:33:25 +0000
committermiod <>2014-07-12 16:33:25 +0000
commit694f0fd489bd21b41184bac313dde7df92e2eb21 (patch)
treee47070007b4c259807117e4a667116b0399b6255 /src/lib/libcrypto/asn1/t_x509.c
parent1ae7466a2fdd60df6484d8d132d70a044fd58c92 (diff)
downloadopenbsd-694f0fd489bd21b41184bac313dde7df92e2eb21.tar.gz
openbsd-694f0fd489bd21b41184bac313dde7df92e2eb21.tar.bz2
openbsd-694f0fd489bd21b41184bac313dde7df92e2eb21.zip
Make sure the return value of X509_NAME_oneline(, NULL,) is checked against
NULL. ok deraadt@ guenther@ jsing@
Diffstat (limited to 'src/lib/libcrypto/asn1/t_x509.c')
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c
index e6f0692ccc..f4872d8b24 100644
--- a/src/lib/libcrypto/asn1/t_x509.c
+++ b/src/lib/libcrypto/asn1/t_x509.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_x509.c,v 1.24 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: t_x509.c,v 1.25 2014/07/12 16:33:25 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -505,7 +505,9 @@ X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
505 l = 80 - 2 - obase; 505 l = 80 - 2 - obase;
506 506
507 b = X509_NAME_oneline(name, NULL, 0); 507 b = X509_NAME_oneline(name, NULL, 0);
508 if (!*b) { 508 if (b == NULL)
509 return 0;
510 if (*b == '\0') {
509 free(b); 511 free(b);
510 return 1; 512 return 1;
511 } 513 }