Skip to content
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

Limit peek_all to return data up until self.len #40

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

DRiKE
Copy link
Contributor

@DRiKE DRiKE commented Aug 29, 2023

When creating a new Parser by calling .parse_parser(some_len) on an existing Parser, the new parser has a limited view over the same octets as the old parser. This limit (self.len) was however not respected by the peek_all() method, possibly returning an unexpectedly large slice.

@DRiKE DRiKE requested a review from partim August 29, 2023 18:02
@partim partim merged commit 38e0eda into main Aug 30, 2023
24 checks passed
@partim partim deleted the limit-parser-peek_all branch August 30, 2023 09:35
partim added a commit that referenced this pull request Oct 18, 2023
Breaking changes

* Change the lifetime of the range for a reference to the lifetime of the
  reference. ([#41] by [@xofyarg])
* Explicitly re-export select items at crate level rather than wildcard
  export everything. ([#39])

New

* Adds a `BuilderAppendError<_>` type alias that simplifies trait bounds
  for complex `FromBuilder` trait bounds. ([#38])

Bug fixes

* Fix `Parser::peek_all` to only return data up until the parser's
  length rather than all data. ([#40])
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