◐ Shell
clean mode source ↗

Attempt 2 - Fix Missing Git Executable Causing ClusterFuzz Crash by DaveLak · Pull Request #1909 · gitpython-developers/GitPython

Expand Up @@ -23,15 +23,15 @@ import os from configparser import MissingSectionHeaderError, ParsingError
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): path_to_bundled_git_binary = os.path.abspath(os.path.join(os.path.dirname(__file__), "git")) os.environ["GIT_PYTHON_GIT_EXECUTABLE"] = path_to_bundled_git_binary
with atheris.instrument_imports(): import git

def TestOneInput(data): if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): path_to_bundled_git_binary = os.path.abspath(os.path.join(os.path.dirname(__file__), "git")) git.refresh(path_to_bundled_git_binary)
sio = io.BytesIO(data) sio.name = "/tmp/fuzzconfig.config" git_config = git.GitConfigParser(sio) Expand Down