aboutsummaryrefslogtreecommitdiff
path: root/openssl/apps/rsautl.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/apps/rsautl.c')
-rw-r--r--openssl/apps/rsautl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openssl/apps/rsautl.c b/openssl/apps/rsautl.c
index 0030aca12..d642f9ad9 100644
--- a/openssl/apps/rsautl.c
+++ b/openssl/apps/rsautl.c
@@ -268,6 +268,11 @@ int MAIN(int argc, char **argv)
rsa_in = OPENSSL_malloc(keysize * 2);
rsa_out = OPENSSL_malloc(keysize);
+ if (!rsa_in || !rsa_out) {
+ BIO_printf(bio_err, "Out of memory\n");
+ ERR_print_errors(bio_err);
+ goto end;
+ }
/* Read the input data */
rsa_inlen = BIO_read(in, rsa_in, keysize * 2);