]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pkcs11-util: don't mask return value of the first asprintf()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 6 Jan 2020 09:44:19 +0000 (10:44 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Jan 2020 01:30:52 +0000 (10:30 +0900)
Fixes CID#1409666

src/shared/pkcs11-util.c

index fac98ad0eadf09c9de80e9ed3c84ccaa27dd49e5..3fcd7630db6bd429c2fd154168e7d728b84db61f 100644 (file)
@@ -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);