Skip to content

fix-no-newline-parse#102

Merged
mdecimus merged 2 commits intostalwartlabs:mainfrom
sbeckeriv:fix-no-newline-parse
Mar 9, 2025
Merged

fix-no-newline-parse#102
mdecimus merged 2 commits intostalwartlabs:mainfrom
sbeckeriv:fix-no-newline-parse

Conversation

@sbeckeriv
Copy link
Copy Markdown
Contributor

Dearest Reviewer,

Issue #90 brought up an issue that if there was no newline it would fail. the user provided an easy reproduction case. I was able to track it down to the parse raw function.

The issue is that the loop hits the end of the string and returns Empty. However, if there is a start offset then some characters were found. This code just checks the offset after the loop.

If this is not the correct behavior please close.

Thanks for your time
Becker

Dearest Reviewer,

Issue stalwartlabs#90 brought up the issue that if there was no newline. the user
provided an easy reproduction case. I was able to track it down to the
parse raw function.

The issue is that the loop hits the end of the string and returns Empty.
However, if there is a start offset then some characters were found. This
code just checks the offset after the loop.

If this is not the correct behavior please close.

Thanks for your time
Becker
sbeckeriv added a commit to sbeckeriv/mail-parser that referenced this pull request Mar 1, 2025
Dearest Reviewer,

While creating PR stalwartlabs#102 I tried running the fuzz command and found it
failing. It looks like the functions were made private and parse headers
arguments were updated.

I dont know if this is a complete update or what is covered but it does
get `cargo +nightly fuzz run mail_parser` working again.

Thanks for your time.
Becker
@sbeckeriv sbeckeriv mentioned this pull request Mar 1, 2025
mdecimus pushed a commit that referenced this pull request Mar 2, 2025
* fix-fuzz-targets

Dearest Reviewer,

While creating PR #102 I tried running the fuzz command and found it
failing. It looks like the functions were made private and parse headers
arguments were updated.

I dont know if this is a complete update or what is covered but it does
get `cargo +nightly fuzz run mail_parser` working again.

Thanks for your time.
Becker

* readd space
Add break instead of duplicating code.
@mdecimus mdecimus merged commit b293257 into stalwartlabs:main Mar 9, 2025
1 check passed
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.

2 participants