From: Mark Andrews Date: Thu, 13 Aug 2020 22:26:53 +0000 (+1000) Subject: Ensure that a bool is stored in 'eol' X-Git-Tag: v9.17.5~48^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b75833aaaa1700ec7b7974c7b827304cefc3569;p=thirdparty%2Fbind9.git Ensure that a bool is stored in 'eol' oss-fuzz: Issue 24875: bind9:isc_lex_getmastertoken_fuzzer: Invalid-bool-value in isc_lex_getmastertoken.c --- diff --git a/fuzz/isc_lex_getmastertoken.c b/fuzz/isc_lex_getmastertoken.c index 64d4727332c..7ead75a7eb3 100644 --- a/fuzz/isc_lex_getmastertoken.c +++ b/fuzz/isc_lex_getmastertoken.c @@ -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);