Skip to content

Fix memory corruption when unpacking unknown enum#184

Open
cracksalad wants to merge 1 commit intomsgpack:masterfrom
cracksalad:master
Open

Fix memory corruption when unpacking unknown enum#184
cracksalad wants to merge 1 commit intomsgpack:masterfrom
cracksalad:master

Conversation

@cracksalad
Copy link
Copy Markdown
Contributor

If one unpacks a serialized enum value and...

  • the corresponding enum definition could not be loaded (not required nor autoloadable) or
  • the type name (say test\MyType) is not an enum but a normal class

...there is no warning or error thrown but one would experience memory corruption instead. I am talking about variables having values which are not allowed by their types and something like that - really scary.

Definitely related to #183 and maybe also to #181

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 11, 2026

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

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.51%. Comparing base (712cc13) to head (5bded50).
⚠️ Report is 86 commits behind head on master.

Files with missing lines Patch % Lines
msgpack_unpack.c 87.50% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
- Coverage   73.88%   68.51%   -5.37%     
==========================================
  Files           6        7       +1     
  Lines        1191     1350     +159     
  Branches        0      247     +247     
==========================================
+ Hits          880      925      +45     
+ Misses        311      310       -1     
- Partials        0      115     +115     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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