diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-02-01 11:52:48 -0500 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2013-04-22 19:59:20 -0400 |
commit | 5bad062b6e122354a5557d463f1e5e198374e0c9 (patch) | |
tree | d1c377ea190687602d38a92ad8da1551f057e355 | |
parent | 9de6c0c7f4b26c04e6b9c31ff5f9c9efa35d28f1 (diff) | |
download | krb5-5bad062b6e122354a5557d463f1e5e198374e0c9.zip krb5-5bad062b6e122354a5557d463f1e5e198374e0c9.tar.gz krb5-5bad062b6e122354a5557d463f1e5e198374e0c9.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: 7617 (new)
version_fixed: 1.9.5
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 6d4e6bb..9c91024 100644 --- a/src/kadmin/dbutil/dump.c +++ b/src/kadmin/dbutil/dump.c @@ -1514,7 +1514,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; |