kadmin: list_princs zero get_opt structure before use
Not all fields are assigned to. Initialize the structure to zero before use. Change-Id: I2cfc60baaf8bf80389950a373c2a82f600a71aa2
This commit is contained in:
@@ -632,6 +632,7 @@ list_princs(struct list_options *opt, int argc, char **argv)
|
||||
krb5_warnx(context, "programmer error: sizeof(struct get_options) != sizeof(struct list_options)");
|
||||
return 0;
|
||||
}
|
||||
memset(&get_opt, 0, sizeof(get_opt));
|
||||
get_opt.long_flag = opt->long_flag;
|
||||
get_opt.short_flag = opt->short_flag;
|
||||
get_opt.terse_flag = opt->terse_flag;
|
||||
|
Reference in New Issue
Block a user