]> git.ipfire.org Git - thirdparty/bind9.git/commit
Tighten $GENERATE directive parsing
authorMark Andrews <marka@isc.org>
Fri, 1 Jul 2022 01:13:51 +0000 (11:13 +1000)
committerMark Andrews <marka@isc.org>
Wed, 6 Jul 2022 01:26:24 +0000 (11:26 +1000)
commitd10e20da0dbd6d6438d55a5e9c6e22cee70aec20
treed54b219a4509cd075e23ae48f2b219c55c952310
parent16ac79a8f720a917b0f787178905a8df56d4d557
Tighten $GENERATE directive parsing

The original sscanf processing allowed for a number of syntax errors
to be accepted.  This included missing the closing brace in
${modifiers}

Look for both comma and right brace as intermediate seperators as
well as consuming the final right brace in the sscanf processing
for ${modifiers}.  Check when we got right brace to determine if
the sscanf consumed more input than expected and if so behave as
if it had stopped at the first right brace.

(cherry picked from commit 7be64c0e94c967c0014a0b960a495c4fb05f1fc2)
bin/tests/system/checkzone/zones/bad-generate-garbage.db [new file with mode: 0644]
bin/tests/system/checkzone/zones/bad-generate-missing-brace.db [new file with mode: 0644]
bin/tests/system/checkzone/zones/good-generate-modifier.db [new file with mode: 0644]
lib/dns/master.c