From: Miltos Allamanis Date: Tue, 3 Jun 2025 15:30:43 +0000 (+0000) Subject: Fix builds for the OSS-Fuzz project X-Git-Tag: v9.21.9~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c04b8402604ac40f3cdb1f2b1ae244892b4784cd;p=thirdparty%2Fbind9.git Fix builds for the OSS-Fuzz project Since 70b1777d8aef75da1b184fe8155dc818ce66628a was commited the OSS-Fuzz build was broken because the `chunk_get_raw()` was not updated in the `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION`-enabled area. Add the `size` argument to the fuzzing version of the `chunk_get_raw()` function. --- diff --git a/lib/dns/qp.c b/lib/dns/qp.c index afed2a7fcf6..7436d07cf54 100644 --- a/lib/dns/qp.c +++ b/lib/dns/qp.c @@ -392,7 +392,7 @@ chunk_size_raw(void) { } static void * -chunk_get_raw(dns_qp_t *qp) { +chunk_get_raw(dns_qp_t *qp, size_t len) { if (qp->write_protect) { size_t size = chunk_size_raw(); void *ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, @@ -400,7 +400,7 @@ chunk_get_raw(dns_qp_t *qp) { RUNTIME_CHECK(ptr != MAP_FAILED); return ptr; } else { - return isc_mem_allocate(qp->mctx, QP_CHUNK_BYTES); + return isc_mem_allocate(qp->mctx, len); } }