aboutsummaryrefslogtreecommitdiff
path: root/openssl/apps/x509.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/apps/x509.c')
-rw-r--r--openssl/apps/x509.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openssl/apps/x509.c b/openssl/apps/x509.c
index d005c82bb..864a60dda 100644
--- a/openssl/apps/x509.c
+++ b/openssl/apps/x509.c
@@ -829,6 +829,11 @@ int MAIN(int argc, char **argv)
z = i2d_X509(x, NULL);
m = OPENSSL_malloc(z);
+ if (!m) {
+ BIO_printf(bio_err, "Out of memory\n");
+ ERR_print_errors(bio_err);
+ goto end;
+ }
d = (unsigned char *)m;
z = i2d_X509_NAME(X509_get_subject_name(x), &d);