diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-02-01 11:52:48 -0500 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2013-02-22 18:24:05 -0500 |
commit | 404d8b8662112a9d8886887961b7222d1aad4563 (patch) | |
tree | 4557d26423a6e1d02b3462fc832218d5fb70b614 | |
parent | 8b03510d5e919ce2047b64d9a4b4d3a9fe6a07a4 (diff) | |
download | krb5-404d8b8662112a9d8886887961b7222d1aad4563.zip krb5-404d8b8662112a9d8886887961b7222d1aad4563.tar.gz krb5-404d8b8662112a9d8886887961b7222d1aad4563.tar.bz2 |
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: 7581 (new)
version_fixed: 1.10.4
status: resolved
-rw-r--r-- | 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 bf8c8e5..2473f48 100644 --- a/src/kadmin/dbutil/dump.c +++ b/src/kadmin/dbutil/dump.c @@ -1508,7 +1508,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; |