Skip to content

Fix IndexError in GitConfigParser When a Quoted Config Value Contains a Trailing New Line #1908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid unnecessary isinstance check
  • Loading branch information
Byron authored Apr 23, 2024
commit c2283f6e3566606300f64c44a12197f0b65f0d71
2 changes: 1 addition & 1 deletion fuzzing/fuzz-targets/fuzz_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def TestOneInput(data):
except (MissingSectionHeaderError, ParsingError, UnicodeDecodeError):
return -1 # Reject inputs raising expected exceptions
except ValueError as e:
if isinstance(e, ValueError) and "embedded null byte" in str(e):
if "embedded null byte" in str(e):
# The `os.path.expanduser` function, which does not accept strings
# containing null bytes might raise this.
return -1
Expand Down
Loading