提交 fb7fbf28 编写于 作者: J Jonas Maebe 提交者: Kurt Roeckx

UI_construct_prompt: check for NULL when allocating prompt

Signed-off-by: NKurt Roeckx <kurt@openssl.org>
Reviewed-by: NDr. Stephen Henson <steve@openssl.org>
上级 ba494ee5
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册