Commit e094102bf7 for bind

commit e094102bf7e1a0845790f9798b3d9516ea277f13
Author: Petr Špaček <pspacek@isc.org>
Date:   Wed Nov 4 10:29:16 2026 +0000

    Decode master-token fuzz headers as two bytes

    The seeds use a two-byte header. Reading a native enum consumed payload
    bytes and selected invalid token types. The API accepts the full enum,
    including expectations that exercise error handling.

    Assisted-by: Codex:gpt-6

diff --git a/fuzz/isc_lex_getmastertoken.c b/fuzz/isc_lex_getmastertoken.c
index e53cede719..2ebc371943 100644
--- a/fuzz/isc_lex_getmastertoken.c
+++ b/fuzz/isc_lex_getmastertoken.c
@@ -17,7 +17,6 @@
 #include <isc/buffer.h>
 #include <isc/lex.h>
 #include <isc/mem.h>
-#include <isc/string.h>
 #include <isc/util.h>

 #include "fuzz.h"
@@ -48,17 +47,16 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 	isc_tokentype_t expect;
 	bool eol;

-	if (size < sizeof(expect) + sizeof(eol)) {
+	/* One byte selects the token type; one byte enables end-of-line tokens.
+	 */
+	if (size < 2) {
 		return 0;
 	}

-	(void)memmove(&expect, data, sizeof(expect));
-	data += sizeof(expect);
-	size -= sizeof(expect);
-
-	eol = *data != 0;
-	data += 1;
-	size -= 1;
+	expect = (isc_tokentype_t)(data[0] % (isc_tokentype_qvpair + 1));
+	eol = data[1] != 0;
+	data += 2;
+	size -= 2;

 	isc_lex_create(mctx, 1024, &lex);