aboutsummaryrefslogtreecommitdiff
path: root/projects/bs4/bs4_fuzzer.py
diff options
context:
space:
mode:
Diffstat (limited to 'projects/bs4/bs4_fuzzer.py')
-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: