krb5 commit [krb5-1.11]: Fix kdb5_util dump.c uninitialized warnings
Tom Yu
tlyu at MIT.EDU
Wed Feb 6 15:30:45 EST 2013
https://github.com/krb5/krb5/commit/604d465c7d9dacf278e6a310f3f9e8a3a2dabda3
commit 604d465c7d9dacf278e6a310f3f9e8a3a2dabda3
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.
(cherry picked from commit 1b7f7eef8a95bda0135159b2c06a168b56d9f42b)
ticket: 7560
version_fixed: 1.11.1
status: resolved
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 417aa59..e925b0a 100644
--- a/src/kadmin/dbutil/dump.c
+++ b/src/kadmin/dbutil/dump.c
@@ -1708,7 +1708,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