Repository navigation
Return None for valueless kvitems members in the yajl2_c builder - #204
Open
nabeel-dev21 wants to merge 1 commit into
Open
nabeel-dev21 wants to merge 1 commit into
nabeel-dev21 wants to merge 1 commit into
Conversation
Reviewer's GuideImplementationMake
DocumentationDocument that
TestsCover filtered parse events that leave a member without a value and verify
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
NULL dereference in yajl2_c builder_value() for valueless kvitems members
When
kvitems()is given an event iterable in which a member'smap_keyis not followed by a value,kvitems_basecoro_send_impl()callsbuilder_value()on the next key orend_mapwhilebuilder->valueis still NULL, andPy_INCREF(NULL)crashes the interpreter. Filtering a path out ofparse()output is enough: with{"name": "x", "password": "secret", "id": 1}and thepasswordevents dropped,kvitems(events, '')segfaults on yajl2_c while the python backend yields('password', None)becauseObjectBuilder.valuestarts asNone, whichbuilder_value()now matches.Summary by Sourcery
Handle valueless kvitems() members safely in the yajl2_c backend and return None for their values.
Bug Fixes:
Tests: