krb5 commit: Initialize ret in process_pa_data
Greg Hudson
ghudson at MIT.EDU
Fri Dec 21 16:21:12 EST 2012
https://github.com/krb5/krb5/commit/90e43628202157d72fb78bbb837795d91d5ce8da
commit 90e43628202157d72fb78bbb837795d91d5ce8da
Author: Greg Hudson <ghudson at mit.edu>
Date: Fri Dec 21 16:18:34 2012 -0500
Initialize ret in process_pa_data
If the for loop never consults any preauth modules and must_preauth is
false, we might never set ret, so we need to initialize it. The bug
was introduced in 5c23bce0e8d3328bb36bc85ee10cfac486b8ae9b and is
detected by some versions of gcc with -O2.
src/lib/krb5/krb/preauth2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index a06233c..8d5439c 100644
--- a/src/lib/krb5/krb/preauth2.c
+++ b/src/lib/krb5/krb/preauth2.c
@@ -586,7 +586,7 @@ process_pa_data(krb5_context context, krb5_get_init_creds_opt *opt,
struct krb5_preauth_context_st *pctx = context->preauth_context;
struct errinfo save = EMPTY_ERRINFO;
krb5_pa_data *pa, **pa_ptr, **mod_pa;
- krb5_error_code ret;
+ krb5_error_code ret = 0;
clpreauth_handle h;
int real, i;
More information about the cvs-krb5
mailing list