krb5 commit: Fix kdb5_util dump.c uninitialized warnings
Greg Hudson
ghudson at MIT.EDU
Fri Feb 1 11:53:59 EST 2013
https://github.com/krb5/krb5/commit/1b7f7eef8a95bda0135159b2c06a168b56d9f42b
commit 1b7f7eef8a95bda0135159b2c06a168b56d9f42b
Author: Greg Hudson <ghudson at mit.edu>
Date: Fri Feb 1 11:52:48 2013 -0500
Fix kdb5_util dump.c uninitialized warnings
Some versions of clang report an uninitialized variable warning (which
we treat as an error) in process_k5beta_record. Due to the if-ladder
style of the function, uninitialized tmpint values can be copied
around in certain error cases, although the garbage values would be
ultimately ignored. As a minimal fix, initialize the tmpint
variables.
ticket: 7560 (new)
target_version: 1.11.1
tags: pullup
src/kadmin/dbutil/dump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c
index 869724a..66a72be 100644
--- a/src/kadmin/dbutil/dump.c
+++ b/src/kadmin/dbutil/dump.c
@@ -1707,7 +1707,7 @@ process_k5beta_record(fname, kcontext, filep, flags, linenop)
int alt_key_len, salt_len, alt_salt_len;
char *name;
char *mod_name;
- int tmpint1, tmpint2, tmpint3;
+ int tmpint1 = 0, tmpint2 = 0, tmpint3 = 0;
int error;
const char *try2read;
int i;
More information about the cvs-krb5
mailing list