Skip to content

Commit 63c5faa

Browse files
authored
Merge pull request #5688 from Google-Autofuzz/new_atheris
2 parents d7798fb + 3b69035 commit 63c5faa

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

Tests/oss-fuzz/fuzz_font.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
import sys
1817

19-
import atheris_no_libfuzzer as atheris
20-
import fuzzers
18+
import atheris
19+
20+
with atheris.instrument_imports():
21+
import sys
22+
23+
import fuzzers
2124

2225

2326
def TestOneInput(data):
@@ -26,13 +29,12 @@ def TestOneInput(data):
2629
except Exception:
2730
# We're catching all exceptions because Pillow's exceptions are
2831
# directly inheriting from Exception.
29-
return
30-
return
32+
pass
3133

3234

3335
def main():
3436
fuzzers.enable_decompressionbomb_error()
35-
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
37+
atheris.Setup(sys.argv, TestOneInput)
3638
atheris.Fuzz()
3739
fuzzers.disable_decompressionbomb_error()
3840

Tests/oss-fuzz/fuzz_pillow.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
import sys
1817

19-
import atheris_no_libfuzzer as atheris
20-
import fuzzers
18+
import atheris
19+
20+
with atheris.instrument_imports():
21+
import sys
22+
23+
import fuzzers
2124

2225

2326
def TestOneInput(data):
@@ -26,13 +29,12 @@ def TestOneInput(data):
2629
except Exception:
2730
# We're catching all exceptions because Pillow's exceptions are
2831
# directly inheriting from Exception.
29-
return
30-
return
32+
pass
3133

3234

3335
def main():
3436
fuzzers.enable_decompressionbomb_error()
35-
atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
37+
atheris.Setup(sys.argv, TestOneInput)
3638
atheris.Fuzz()
3739
fuzzers.disable_decompressionbomb_error()
3840

0 commit comments

Comments
 (0)