]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix uninitialized variable bugs
authorGreg Hudson <ghudson@mit.edu>
Thu, 27 Jun 2013 22:41:04 +0000 (18:41 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 28 Jun 2013 02:37:21 +0000 (22:37 -0400)
The previous few commits introduced a couple of bugs where variables
could be used without being initialized.  Fix them.

src/lib/krb5/krb/plugin.c
src/plugins/pwqual/test/main.c

index 059e00b9940a61c5693a1e111a5e2785c5c2a5f4..53616a0c1ee804f3c9c91646f8ef0fd6fc8bc8d9 100644 (file)
@@ -346,7 +346,7 @@ load_if_needed(krb5_context context, struct plugin_mapping *map,
                const char *iname)
 {
     char *symname = NULL;
-    struct plugin_file_handle *handle;
+    struct plugin_file_handle *handle = NULL;
     void (*initvt_fn)();
 
     if (map->module != NULL || map->dyn_path == NULL)
index b05048b6dcff2da10518d69806dd38989df17f2b..e1e39c72afe8d37c1960c15293bd8a528ee214ba 100644 (file)
@@ -77,6 +77,7 @@ init_dict(combo_moddata dict, const char *dict_file)
     /* Decompose the blob into newline-separated words. */
     p = dict->word_block;
     len = sb.st_size;
+    count = 0;
     while (len > 0 && (t = memchr(p, '\n', len)) != NULL) {
         *t = '\0';
         len -= t - p + 1;