Skip to content

Commit

Permalink
Improve the fuzzer wrt. the current atheris version
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Voisin committed Aug 25, 2021
1 parent d50052a commit 9d48143
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Tests/oss-fuzz/fuzz_font.py
Expand Up @@ -14,10 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

import atheris_no_libfuzzer as atheris
import fuzzers
import atheris
with atheris.instrument_imports():
import sys
import fuzzers


def TestOneInput(data):
Expand All @@ -26,13 +27,12 @@ def TestOneInput(data):
except Exception:
# We're catching all exceptions because Pillow's exceptions are
# directly inheriting from Exception.
return
return
pass


def main():
fuzzers.enable_decompressionbomb_error()
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
atheris.Setup(sys.argv, TestOneInput)
atheris.Fuzz()
fuzzers.disable_decompressionbomb_error()

Expand Down
12 changes: 6 additions & 6 deletions Tests/oss-fuzz/fuzz_pillow.py
Expand Up @@ -14,10 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys

import atheris_no_libfuzzer as atheris
import fuzzers
import atheris
with atheris.instrument_imports():
import sys
import fuzzers


def TestOneInput(data):
Expand All @@ -26,13 +27,12 @@ def TestOneInput(data):
except Exception:
# We're catching all exceptions because Pillow's exceptions are
# directly inheriting from Exception.
return
return
pass


def main():
fuzzers.enable_decompressionbomb_error()
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
atheris.Setup(sys.argv, TestOneInput)
atheris.Fuzz()
fuzzers.disable_decompressionbomb_error()

Expand Down

0 comments on commit 9d48143

Please sign in to comment.