Skip to content

Fix crash when running JsonSerializer::closeNested() while in write mode#187

Merged
AndreasLrx merged 1 commit into
mainfrom
fix/json-serializer-crash
Apr 11, 2025
Merged

Fix crash when running JsonSerializer::closeNested() while in write mode#187
AndreasLrx merged 1 commit into
mainfrom
fix/json-serializer-crash

Conversation

@AndreasLrx
Copy link
Copy Markdown
Owner

Description

FIx a crash occuring when calling JsonSerializer::closeNested() while writing data to the serializer due to a missing verification.

Also introduce new isArrayEnd and getArraySize helper methods.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Added/updated tests?

  • Didn't had the time to write them, and I am the maintainer
  • New tests written
  • Existing tests updated
  • Tests are not required because this is a documentation update
  • I need help with writing tests

@AndreasLrx AndreasLrx added bug Something isn't working serialization labels Apr 10, 2025
@AndreasLrx AndreasLrx self-assigned this Apr 10, 2025
@AndreasLrx AndreasLrx force-pushed the fix/json-serializer-crash branch 3 times, most recently from 2a7b8b3 to 0f31d75 Compare April 11, 2025 07:44
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 11, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.36%. Comparing base (4f4cb2a) to head (f093c24).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #187   +/-   ##
=======================================
  Coverage   82.36%   82.36%           
=======================================
  Files          70       70           
  Lines        1242     1242           
  Branches      383      383           
=======================================
  Hits         1023     1023           
  Misses        148      148           
  Partials       71       71           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndreasLrx AndreasLrx force-pushed the fix/json-serializer-crash branch from 4e23733 to f093c24 Compare April 11, 2025 08:04
@AndreasLrx AndreasLrx force-pushed the fix/json-serializer-crash branch from f093c24 to b20713b Compare April 11, 2025 08:09
@AndreasLrx AndreasLrx merged commit b22013e into main Apr 11, 2025
1 of 4 checks passed
@AndreasLrx AndreasLrx deleted the fix/json-serializer-crash branch April 11, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working serialization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants