aboutsummaryrefslogtreecommitdiff
path: root/openssl/apps/srp.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/apps/srp.c')
-rw-r--r--openssl/apps/srp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openssl/apps/srp.c b/openssl/apps/srp.c
index 47b45fbf9..c679448ee 100644
--- a/openssl/apps/srp.c
+++ b/openssl/apps/srp.c
@@ -435,10 +435,18 @@ int MAIN(int argc, char **argv)
# ifdef OPENSSL_SYS_VMS
len = strlen(s) + sizeof(CONFIG_FILE);
tofree = OPENSSL_malloc(len);
+ if(!tofree) {
+ BIO_printf(bio_err, "Out of memory\n");
+ goto err;
+ }
strcpy(tofree, s);
# else
len = strlen(s) + sizeof(CONFIG_FILE) + 1;
tofree = OPENSSL_malloc(len);
+ if(!tofree) {
+ BIO_printf(bio_err, "Out of memory\n");
+ goto err;
+ }
BUF_strlcpy(tofree, s, len);
BUF_strlcat(tofree, "/", len);
# endif