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

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

krb5 commit: Fix uninitialized variable bug in KEYRING ccache

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed May 28 12:17:12 2014

Date: Wed, 28 May 2014 12:17:06 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201405281617.s4SGH66V004199@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/2b8692dad1be01ce0c57ca9d5e92b950c6aba155
commit 2b8692dad1be01ce0c57ca9d5e92b950c6aba155
Author: Greg Hudson <ghudson@mit.edu>
Date:   Wed May 28 11:36:24 2014 -0400

    Fix uninitialized variable bug in KEYRING ccache
    
    Commit 5f4a4d7d357fedac5feadc65c09ecf487ff98db8 removed the only
    unconditional assignment of ret in get_time_offsets, causing the
    function to return an uninitialized value if nothing goes wrong.
    Initialize ret at declaration time to fix this.

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

diff --git a/src/lib/krb5/ccache/cc_keyring.c b/src/lib/krb5/ccache/cc_keyring.c
index 63e49d2..43f33ee 100644
--- a/src/lib/krb5/ccache/cc_keyring.c
+++ b/src/lib/krb5/ccache/cc_keyring.c
@@ -1439,7 +1439,7 @@ get_time_offsets(krb5_context context, krb5_ccache id, int32_t *time_offset,
                  int32_t *usec_offset)
 {
     krcc_data *data = id->data;
-    krb5_error_code ret;
+    krb5_error_code ret = 0;
     key_serial_t key;
     void *payload = NULL;
     int psize;
_______________________________________________
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