[30604] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix minor errors in softpkcs11

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Nov 13 16:26:42 2019

Date: Wed, 13 Nov 2019 16:26:21 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-ID: <201911132126.xADLQLq7015811@drugstore.mit.edu>
To: <cvs-krb5@mit.edu>
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/560e48fee9a192ed4eb1b6cbd62c119087b53948
commit 560e48fee9a192ed4eb1b6cbd62c119087b53948
Author: Robbie Harwood <rharwood@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@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;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post