mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 11:19:59 -04:00
Fix builds for the OSS-Fuzz project
Since 70b1777d8a 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.
This commit is contained in:
parent
7d1cf8f055
commit
c04b840260
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue