diff options
| author | miod <> | 2014-07-12 16:33:25 +0000 |
|---|---|---|
| committer | miod <> | 2014-07-12 16:33:25 +0000 |
| commit | f32d63e4f2007104dce73700052ad2ad2f26ee27 (patch) | |
| tree | e47070007b4c259807117e4a667116b0399b6255 /src/lib/libcrypto/asn1/t_x509.c | |
| parent | 068bf464df6ef084067943863d776f59762bfaf0 (diff) | |
| download | openbsd-f32d63e4f2007104dce73700052ad2ad2f26ee27.tar.gz openbsd-f32d63e4f2007104dce73700052ad2ad2f26ee27.tar.bz2 openbsd-f32d63e4f2007104dce73700052ad2ad2f26ee27.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.c | 6 |
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 | } |
