On Wed, 6 Mar 2024 at 15:34, James Carter <jwcart2@xxxxxxxxx> wrote: > > Commit e16f586 (Fix potential double free of mls_level_t) renamed > the "defined" field to "notdefined", but did not update this use of > it. > > Use the new field "notdefined" for the check. Since the renamed member "notdefined" is checked during validation and the fuzzer calls policydb_valudate() I think the whole callback can be removed. > Signed-off-by: James Carter <jwcart2@xxxxxxxxx> > --- > checkpolicy/fuzz/checkpolicy-fuzzer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/checkpolicy/fuzz/checkpolicy-fuzzer.c b/checkpolicy/fuzz/checkpolicy-fuzzer.c > index 0d749a02..a3da0b57 100644 > --- a/checkpolicy/fuzz/checkpolicy-fuzzer.c > +++ b/checkpolicy/fuzz/checkpolicy-fuzzer.c > @@ -135,7 +135,7 @@ static int check_level(hashtab_key_t key, hashtab_datum_t datum, void *arg __att > const level_datum_t *levdatum = (level_datum_t *) datum; > > // TODO: drop member defined if proven to be always set > - if (!levdatum->isalias && !levdatum->defined) { > + if (!levdatum->isalias && levdatum->notdefined) { > fprintf(stderr, > "Error: sensitivity %s was not used in a level definition!\n", > key); > -- > 2.44.0 >