summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-12-05 00:04:30 +0000
committerRichard Levitte <levitte@openssl.org>2002-12-05 00:04:30 +0000
commit85940ea8ea682970aa1f6e80d22a6265c9ea0bc2 (patch)
treee9edf56e9bc91ed7dcde1bfbcc1e0a5dfcbbda2d /crypto/ui
parent439ae4d398bd7723b68d18f7912d992b30a29902 (diff)
Only check for a result buffer if the allocated string is a prompt string.
PR: 381
Diffstat (limited to 'crypto/ui')
-rw-r--r--crypto/ui/ui_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c
index 06d1c2ba93..1dad878ff6 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -145,7 +145,8 @@ static UI_STRING *general_allocate_prompt(UI *ui, const char *prompt,
{
UIerr(UI_F_GENERAL_ALLOCATE_PROMPT,ERR_R_PASSED_NULL_PARAMETER);
}
- else if (result_buf == NULL)
+ else if ((type == UIT_PROMPT || type == UIT_VERIFY
+ || type == UIT_BOOLEAN) && result_buf == NULL)
{
UIerr(UI_F_GENERAL_ALLOCATE_PROMPT,UI_R_NO_RESULT_BUFFER);
}