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 memory leak in parson's parse_object_value() #801

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jepio
Copy link
Member

@jepio jepio commented Nov 13, 2024

Description

Fix a memory leak in parson by adding a missing free in parson's parse_object_value implementation. The leak is triggerable from our code through fuzzing and we bundle parson so we're responsible for fixing issues in it.

get_quoted_string returns an allocated string and all other branches in the loop contain the call to parson_free (which is free by default). This fix is based on how upstream parson implemented the bugfix: kgabis/parson@ab7f5e5.

Checklist

  • I have read the contribution guidelines.
  • All unit tests are passing.
  • I have merged the latest main branch prior to this PR submission.
  • I submitted this PR against the main branch.

@jepio jepio requested a review from a team as a code owner November 13, 2024 18:24
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