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

Fix incorrect data consumption for &max-size. #1669

Closed
wants to merge 0 commits into from

Conversation

bbannier
Copy link
Member

@bbannier bbannier commented Feb 5, 2024

We would previously handle &size and &max-size almost identical with the only difference that &max-size sets up a slightly larger view to accomodate a sentinel. In particular, we also used identical code to set up the position where parsing should resume after such a field.

This was incorrect as it is in general impossible to tell where parsing continues after a field with &max-size since it does not signify a fixed view like &size. In this patch we now compute the next position for a &max-size field by inspecting the limited view to detect how much data was extracted.

Closes #1668.

@bbannier bbannier self-assigned this Feb 5, 2024
@bbannier bbannier force-pushed the topic/bbannier/issue-1668 branch from 5579d4f to 8044db2 Compare February 5, 2024 15:57
@bbannier bbannier marked this pull request as ready for review February 5, 2024 16:15
@bbannier bbannier requested a review from rsmmr February 5, 2024 16:15
@bbannier bbannier requested a review from rsmmr February 8, 2024 13:32
@bbannier bbannier closed this Feb 8, 2024
@bbannier bbannier force-pushed the topic/bbannier/issue-1668 branch from 5804f01 to 07b0d3d Compare February 8, 2024 16:07
@bbannier bbannier deleted the topic/bbannier/issue-1668 branch February 8, 2024 16:20
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.

&max-size has effect on how much data is consumed
2 participants