krb5 commit: Fix garbage return in extract_cammacs()

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/8b3384c4bb91031a8cc648ecef2b20b8a4480e73
commit 8b3384c4bb91031a8cc648ecef2b20b8a4480e73
Author: Robbie Harwood <[email protected]>
Date:   Mon Jun 18 17:49:52 2018 -0400

    Fix garbage return in extract_cammacs()
    
    If no cammacs were present, we would never initialize ret before
    returning it.  (extract_cammcs() is currently never called with an
    empty or null list, so this does not manifest as a bug.)
    
    [[email protected]: amended commit message]

 src/lib/krb5/krb/authdata.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/krb5/krb/authdata.c b/src/lib/krb5/krb/authdata.c
index 8fd1f05..7fbcfab 100644
--- a/src/lib/krb5/krb/authdata.c
+++ b/src/lib/krb5/krb/authdata.c
@@ -546,7 +546,7 @@ static krb5_error_code
 extract_cammacs(krb5_context kcontext, krb5_authdata **cammacs,
                 const krb5_keyblock *key, krb5_authdata ***ad_out)
 {
-    krb5_error_code ret;
+    krb5_error_code ret = 0;
     krb5_authdata **list = NULL, **elements = NULL, **new_list;
     size_t i, n_elements, count = 0;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.