Skip to content

Conversation

@wangmot
Copy link

@wangmot wangmot commented Oct 31, 2025

This PR addresses the issue: #1215.

Prevent Java class files from being misidentified as Mach-O FAT binaries by checking bytes 5-8. The first 4 bytes of java class and macho fat files are CA FE BA BE. The updated logic reads the first 8 bytes of the file and verifies whether the minor/major version falls within the valid Java class file range. If so, the file is not identified as a Mach-O FAT file. This change helps file type detection where Java class files were incorrectly identified as Mach-O FAT binaries.

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.

1 participant