]> 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:25:20 +0000 (11:25 +1000)
commit656e33ce18435c3a1c516c5a7ab633d790ebabfa
treea85a21042ac87d9a67f77278a305fa84d80095ca
parent72999440bd15a03948a682cd3171df25d8436e01
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