]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure that a bool is stored in 'eol'
authorMark Andrews <marka@isc.org>
Thu, 13 Aug 2020 22:26:53 +0000 (08:26 +1000)
committerMark Andrews <marka@isc.org>
Thu, 13 Aug 2020 22:35:17 +0000 (08:35 +1000)
oss-fuzz: Issue 24875: bind9:isc_lex_getmastertoken_fuzzer: Invalid-bool-value in isc_lex_getmastertoken.c

fuzz/isc_lex_getmastertoken.c

index 64d4727332c1d086ceb1217eca5a3b1e5f485d53..7ead75a7eb374ad927d27850c7e1505df82d596d 100644 (file)
@@ -61,9 +61,9 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
        data += sizeof(expect);
        size -= sizeof(expect);
 
-       (void)memmove(&eol, data, sizeof(eol));
-       data += sizeof(eol);
-       size -= sizeof(eol);
+       eol = *data != 0;
+       data += 1;
+       size -= 1;
 
        isc_buffer_constinit(&buf, data, size);
        isc_buffer_add(&buf, size);