From 0e97a910a63d338f0acce6302de76b3e96c9cd70 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 6 Jan 2020 10:44:19 +0100 Subject: [PATCH] pkcs11-util: don't mask return value of the first asprintf() Fixes CID#1409666 --- src/shared/pkcs11-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/pkcs11-util.c b/src/shared/pkcs11-util.c index fac98ad0ea..3fcd7630db 100644 --- a/src/shared/pkcs11-util.c +++ b/src/shared/pkcs11-util.c @@ -218,7 +218,7 @@ int pkcs11_token_login( r = asprintf(&text, "Please enter correct PIN for security token '%s' in order to unlock %s (final try):", token_label, friendly_name); - if (FLAGS_SET(token_info->flags, CKF_USER_PIN_COUNT_LOW)) + else if (FLAGS_SET(token_info->flags, CKF_USER_PIN_COUNT_LOW)) r = asprintf(&text, "PIN has been entered incorrectly previously, please enter correct PIN for security token '%s' in order to unlock %s:", token_label, friendly_name); -- 2.25.1