Skip to content

Conversation

@wtn
Copy link
Contributor

@wtn wtn commented Nov 14, 2025

Fixes crashes when parsing malformed binary plist files with invalid offset_size values.

Changes

  • Add validation that offset_size is in valid range [1,2,3,4]
  • Add nil check for coded_offset_table before calling bytesize
  • Add tests for invalid offset_size and offset table overflow

Background

The binary parser would crash with TypeError or NoMethodError when given malformed plist files with invalid offset_size values (e.g., 5) or when fd.read returned nil.

Co-authored-by: Claude <noreply@anthropic.com>
@ckruse ckruse merged commit fdb123a into ckruse:master Nov 14, 2025
10 checks passed
@wtn wtn deleted the offset branch November 14, 2025 07:07
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