BUG/MAJOR: set the correct generation ID in pat_ref_append().
Some checks are pending
Contrib / build (push) Waiting to run
alpine/musl / gcc (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run

This fixes crashes when creating more than one new revision of a map or
acl file and purging the previous version.
This commit is contained in:
Maxime Henrion 2025-12-30 13:58:56 -05:00 committed by Olivier Houchard
parent 54f59e4669
commit 51592f7a09

View file

@ -2052,7 +2052,7 @@ struct pat_ref_elt *pat_ref_append(struct pat_ref *ref, unsigned int gen_id,
goto fail;
}
elt->gen_id = ref->curr_gen;
elt->gen_id = gen_id;
elt->line = line;
memcpy((char*)elt->pattern, pattern, len + 1);