From: Jonas Maebe Date: Sun, 8 Dec 2013 21:45:15 +0000 (+0100) Subject: UI_construct_prompt: check for NULL when allocating prompt X-Git-Tag: master-post-reformat~491 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fb7fbf28b3d42e67d1611c10eed53bafed93c898;p=oweals%2Fopenssl.git UI_construct_prompt: check for NULL when allocating prompt Signed-off-by: Kurt Roeckx Reviewed-by: Dr. Stephen Henson --- 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)