aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ui/ui_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ui/ui_lib.c')
-rw-r--r--crypto/ui/ui_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c
index 2f580352ce8f..d25b4f37bd11 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -413,6 +413,8 @@ char *UI_construct_prompt(UI *ui, const char *object_desc,
len += sizeof(prompt3) - 1;
prompt = (char *)OPENSSL_malloc(len + 1);
+ if (prompt == NULL)
+ return NULL;
BUF_strlcpy(prompt, prompt1, len + 1);
BUF_strlcat(prompt, object_desc, len + 1);
if (object_name) {