Skip to content

Commit

Permalink
Rename Fuzz Harness
Browse files Browse the repository at this point in the history
  • Loading branch information
ebell495 authored and ForAllSecure Mayhem Bot committed Sep 30, 2024
1 parent 33b3f3c commit 537c644
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ RUN pip3 install atheris

COPY . /symspellpy
WORKDIR /symspellpy
RUN python3 -m pip install . && chmod +x fuzz/fuzz.py
RUN python3 -m pip install . && chmod +x fuzz/fuzz_spellcheck.py
4 changes: 2 additions & 2 deletions Mayhemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project: symspellpy
target: fuzz
target: fuzz_spellcheck

cmds:
- cmd: fuzz/fuzz.py
- cmd: fuzz/fuzz_spellcheck.py
libfuzzer: true
6 changes: 2 additions & 4 deletions fuzz/fuzz.py → fuzz/fuzz_spellcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

@atheris.instrument_func
def TestOneInput(data):
try:
input_term = data.decode("utf-8")
except UnicodeDecodeError:
return
fdp = atheris.FuzzedDataProvider(data)
input_term = fdp.ConsumeUnicodeNoSurrogates(len(data))

sym_spell.lookup_compound(input_term, max_edit_distance=2)

Expand Down

0 comments on commit 537c644

Please sign in to comment.