Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 5048e6d

Browse files
authored
Allow use of readonly_inputs for qemu_user template (#3116)
* Allow use of readonly_inputs for qemu_user template * formatting fix
1 parent dc66164 commit 5048e6d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cli/onefuzz/templates/libfuzzer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ def qemu_user(
897897
no_check_fuzzer_help: bool = False,
898898
extra_container: Optional[Container] = None,
899899
crashes: Optional[Container] = None,
900+
readonly_inputs: Optional[Container] = None,
900901
) -> Optional[Job]:
901902
"""
902903
libfuzzer tasks, wrapped via qemu-user (PREVIEW FEATURE)
@@ -950,7 +951,7 @@ def qemu_user(
950951
)
951952

952953
if existing_inputs:
953-
self.onefuzz.containers.get(existing_inputs)
954+
self.onefuzz.containers.get(existing_inputs) # ensure it exists
954955
helper.containers[ContainerType.inputs] = existing_inputs
955956
else:
956957
helper.define_containers(ContainerType.inputs)
@@ -968,6 +969,10 @@ def qemu_user(
968969
if extra_container is not None:
969970
fuzzer_containers.append((ContainerType.extra, extra_container))
970971

972+
if readonly_inputs is not None:
973+
self.onefuzz.containers.get(readonly_inputs) # ensure it exists
974+
fuzzer_containers.append((ContainerType.readonly_inputs, readonly_inputs))
975+
971976
helper.create_containers()
972977

973978
target_exe_blob_name = helper.setup_relative_blob_name(target_exe, None)

0 commit comments

Comments
 (0)