Skip to content

Commit bf2a112

Browse files
authored
Fix order of environment setup and git module import
The environment setup must happen before the `git` module is imported, otherwise GitPython won't be able to find the Git executable and raise an exception that causes the ClusterFuzz fuzzer runs to fail.
1 parent 27de867 commit bf2a112

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fuzzing/fuzz-targets/fuzz_submodule.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import tempfile
55
from configparser import ParsingError
6-
from git import Repo, GitCommandError, InvalidGitRepositoryError
76
from utils import (
87
setup_git_environment,
98
handle_exception,
@@ -12,7 +11,7 @@
1211

1312
# Setup the git environment
1413
setup_git_environment()
15-
14+
from git import Repo, GitCommandError, InvalidGitRepositoryError
1615

1716
def TestOneInput(data):
1817
fdp = atheris.FuzzedDataProvider(data)

0 commit comments

Comments
 (0)