summaryrefslogtreecommitdiffstats
path: root/test/uitest.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-28 18:02:37 +0200
committerTodd Short <todd.short@me.com>2022-06-02 16:36:56 +0200
commit5755c11fd6e50028946e6e17c835afcd56995699 (patch)
tree92ed95011ca89741b31cabfd560fc935116a84ec /test/uitest.c
parentFix the checks of EVP_PKEY_private_check (diff)
downloadopenssl-5755c11fd6e50028946e6e17c835afcd56995699.tar.xz
openssl-5755c11fd6e50028946e6e17c835afcd56995699.zip
Fix the checks of UI_add_input_string
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/18424)
Diffstat (limited to 'test/uitest.c')
-rw-r--r--test/uitest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/uitest.c b/test/uitest.c
index 8659b0b4be..82c8c59204 100644
--- a/test/uitest.c
+++ b/test/uitest.c
@@ -44,8 +44,8 @@ static int test_old(void)
/* The wrapper passes the UI userdata as the callback userdata param */
UI_add_user_data(ui, defpass);
- if (!UI_add_input_string(ui, "prompt", UI_INPUT_FLAG_DEFAULT_PWD,
- pass, 0, sizeof(pass) - 1))
+ if (UI_add_input_string(ui, "prompt", UI_INPUT_FLAG_DEFAULT_PWD,
+ pass, 0, sizeof(pass) - 1) <= 0)
goto err;
switch (UI_process(ui)) {