diff options
author | Greg Hudson <ghudson@mit.edu> | 2014-05-28 11:36:24 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2014-05-28 12:15:20 -0400 |
commit | 2b8692dad1be01ce0c57ca9d5e92b950c6aba155 (patch) | |
tree | 171a6d7b175c0d6a6f4fc77e032f0ab6d4c9730f | |
parent | f8b42ef541a463f56720ec9358dd07716b04c5e2 (diff) | |
download | krb5-2b8692dad1be01ce0c57ca9d5e92b950c6aba155.tar.gz krb5-2b8692dad1be01ce0c57ca9d5e92b950c6aba155.tar.xz krb5-2b8692dad1be01ce0c57ca9d5e92b950c6aba155.zip |
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.
-rw-r--r-- | 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 63e49d24e..43f33ee50 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; |