aboutsummaryrefslogtreecommitdiff
path: root/projects/bs4
diff options
context:
space:
mode:
authorBitshift <puddles@google.com>2021-08-16 10:56:54 -0500
committerGitHub <noreply@github.com>2021-08-16 08:56:54 -0700
commit55a5812e8c53bf93bbf6000f3e0d0f168d164d1f (patch)
tree5101c2caeb7c435f4cddba5c8198c9e5a98a7dc5 /projects/bs4
parent926914100cfde1926ba30c3e3a1b8f305b9b7d03 (diff)
downloadoss-fuzz-55a5812e8c53bf93bbf6000f3e0d0f168d164d1f.tar.gz
Update fuzzers to new Atheris version (#6060)
* Update fuzzers to new Atheris version * Pin new atheris version * Change = to == * Change path where Atheris fuzzers ld_preload from * Update hypothesis fuzzer to work with new atheris * Set version to 2.0.1 * Switch to Atheris 2.0.4 * Correct spelling of pygments_fuzzer decorator * instrument yaml_reader * Change to latest Atheris * Set atheris version to 2.0.6
Diffstat (limited to 'projects/bs4')
-rw-r--r--projects/bs4/bs4_fuzzer.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/projects/bs4/bs4_fuzzer.py b/projects/bs4/bs4_fuzzer.py
index 119426174..b5125121a 100644
--- a/projects/bs4/bs4_fuzzer.py
+++ b/projects/bs4/bs4_fuzzer.py
@@ -14,12 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import logging
import sys
-import warnings
import atheris
-from bs4 import BeautifulSoup
+with atheris.instrument_imports():
+ import logging
+ import warnings
+ from bs4 import BeautifulSoup
try:
@@ -33,6 +34,7 @@ except ImportError:
pass
+@atheris.instrument_func
def TestOneInput(data):
"""TestOneInput gets random data from the fuzzer, and throws it at bs4."""
if len(data) < 1: