Skip to content

Commit

Permalink
Fix uninitialized variable bug in KEYRING ccache
Browse files Browse the repository at this point in the history
Commit 5f4a4d7 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.
  • Loading branch information
greghudson committed May 28, 2014
1 parent f8b42ef commit 2b8692d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/krb5/ccache/cc_keyring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2b8692d

Please sign in to comment.