]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix uninitialized variable bug in KEYRING ccache
authorGreg Hudson <ghudson@mit.edu>
Wed, 28 May 2014 15:36:24 +0000 (11:36 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 28 May 2014 16:15:20 +0000 (12:15 -0400)
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

index 63e49d24eff82a3d827899d938186a94b97d46de..43f33ee50476fd42fb7519a62f9a686f58fdef4a 100644 (file)
@@ -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;