fix(decoder): corrupt result when a decoder decodes multiple values#954
Open
dxbjavid wants to merge 1 commit into
Open
fix(decoder): corrupt result when a decoder decodes multiple values#954dxbjavid wants to merge 1 commit into
dxbjavid wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #954 +/- ##
==========================================
- Coverage 51.86% 51.24% -0.63%
==========================================
Files 127 170 +43
Lines 10893 14145 +3252
==========================================
+ Hits 5650 7248 +1598
- Misses 4920 6505 +1585
- Partials 323 392 +69
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
Hi maintainers, Just a friendly follow-up on this PR. When you have a chance, could you please provide an update on its review status? Happy to make any additional changes if needed. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
fix
Check the PR title.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en: when a single decoder reads more than one value from the same buffer, the second and later calls begin parsing at a non-zero offset. the opt decoder keeps the whole input in its Json field but only copies data[pos:] into the padded scan buffer, so every node offset ends up shifted by pos and strings or numbers come back from the wrong place; once pos grows past the padding it also reads a little beyond the copied buffer. the utf8-correcting branch just above already stores data[pos:], so this lines the other branch up with it. i have added a regression test that decodes two values from one decoder.
zh(optional):