krb5 commit: Fix garbage return in extract_cammacs()
Greg Hudson
ghudson at mit.edu
Tue Jun 26 12:14:23 EDT 2018
https://github.com/krb5/krb5/commit/8b3384c4bb91031a8cc648ecef2b20b8a4480e73
commit 8b3384c4bb91031a8cc648ecef2b20b8a4480e73
Author: Robbie Harwood <rharwood at redhat.com>
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.)
[ghudson at mit.edu: 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;
More information about the cvs-krb5
mailing list