Skip to content

Conversation

@BurntSushi
Copy link
Owner

Skipping whitespace happens immediately before input[0]. But skipping
the whitespace could lead to input being empty.

We handle the empty case and add a regression test.

Fixes #359

Skipping whitespace happens immediately before `input[0]`. But skipping
the whitespace could lead to `input` being empty.

We handle the empty case and add a regression test.

Fixes #359
@BurntSushi BurntSushi merged commit 016d0b1 into master May 3, 2025
34 checks passed
@BurntSushi BurntSushi deleted the ag/fix-rfc2822-parser-panic branch May 3, 2025 13:22
@ariebovenberg
Copy link
Contributor

Well dang...looks like my latest changes introduced this bug in the parser 😮‍💨 . Really shows the power of fuzz testing though 👀

@BurntSushi
Copy link
Owner Author

Yeah it was a tricky one. And I missed it in review. I hope to setup fuzzing for Jiff soonish.

EliahKagan added a commit to EliahKagan/gitoxide that referenced this pull request May 4, 2025
This upgrades `jiff` to 0.2.12 to fix fuzzing failures. The test
case introduced in the previous commit now passes.

Upgrading `jiff` past 0.2.11 gets the fix for BurntSushi/jiff#359,
fixed in BurntSushi/jiff#360. To avoid declaring compatibility with
a version that has the bug, this advances `jiff` from 0.2.10 to
0.2.12 in the `gix-archive` and `gix-date` manifests.

(The changes in `Cargo.lock` are those that occur automatically
when `cargo check --workspace` is run after those changes.)

Fixes GitoxideLabs#1979
Fixes GitoxideLabs#1982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC 2822 parser can panic on some inputs

3 participants