krb5 commit: Fix minor errors in softpkcs11
Greg Hudson
ghudson at mit.edu
Wed Nov 13 16:26:21 EST 2019
https://github.com/krb5/krb5/commit/560e48fee9a192ed4eb1b6cbd62c119087b53948
commit 560e48fee9a192ed4eb1b6cbd62c119087b53948
Author: Robbie Harwood <rharwood at redhat.com>
Date: Fri Nov 8 14:28:56 2019 -0500
Fix minor errors in softpkcs11
Fix a printf type mismatch in attributes_match() reported by Coverity,
and a possible uninitizlied use of key_type in add_certificate()
reported by clang.
[ghudson at mit.edu: squashed commits and rewrote commit message]
src/tests/softpkcs11/main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/tests/softpkcs11/main.c b/src/tests/softpkcs11/main.c
index a4c3ae7..1cccdfb 100644
--- a/src/tests/softpkcs11/main.c
+++ b/src/tests/softpkcs11/main.c
@@ -261,7 +261,7 @@ attributes_match(const struct st_object *obj,
}
}
if (match == 0) {
- st_logf("type %d attribute have no match\n", attributes[i].type);
+ st_logf("type %lu attribute have no match\n", attributes[i].type);
return 0;
}
}
@@ -553,8 +553,9 @@ add_certificate(char *label,
key_type = CKK_DSA;
break;
default:
- /* XXX */
- break;
+ st_logf("invalid key_type\n");
+ ret = CKR_GENERAL_ERROR;
+ goto out;
}
c = CKO_CERTIFICATE;
More information about the cvs-krb5
mailing list