summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
authorJonas Maebe <jonas.maebe@elis.ugent.be>2013-12-08 22:45:15 +0100
committerKurt Roeckx <kurt@roeckx.be>2014-08-17 18:54:49 +0200
commitfb7fbf28b3d42e67d1611c10eed53bafed93c898 (patch)
tree5c3136b9e107c68771abc8947f0edfe48b176f65 /crypto/ui
parentba494ee593e6e4daa0270cb9bf2c0b5348b207de (diff)
UI_construct_prompt: check for NULL when allocating prompt
Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/ui')
-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 167da002d2..41bc926ca4 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -431,6 +431,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)