krb5 commit: Fix uninitialized variable bugs
Greg Hudson
ghudson at MIT.EDU
Thu Jun 27 22:42:32 EDT 2013
https://github.com/krb5/krb5/commit/ed515a396ee78361ca514be464978da38305f0fb
commit ed515a396ee78361ca514be464978da38305f0fb
Author: Greg Hudson <ghudson at mit.edu>
Date: Thu Jun 27 18:41:04 2013 -0400
Fix uninitialized variable bugs
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 | 2 +-
src/plugins/pwqual/test/main.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/lib/krb5/krb/plugin.c b/src/lib/krb5/krb/plugin.c
index 059e00b..53616a0 100644
--- a/src/lib/krb5/krb/plugin.c
+++ b/src/lib/krb5/krb/plugin.c
@@ -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)
diff --git a/src/plugins/pwqual/test/main.c b/src/plugins/pwqual/test/main.c
index b05048b..e1e39c7 100644
--- a/src/plugins/pwqual/test/main.c
+++ b/src/plugins/pwqual/test/main.c
@@ -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;
More information about the cvs-krb5
mailing list