avast / avast/retdec

Add corruption check for Mach-O files into fileinfo

Open
#315 0 comments 0 reactions 0 assignees View on GitHub
C-fileformat C-fileinfo new-feature T-format-macho
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

In #281, a corruption check of PE files was added into `fileinfo`. What this check does is that it verifies whether the input PE file is loadable by the Windows loader, and presents this piece of information to the user:
```
"loaderError" :
{
"code" : 9,
"code_text" : "LDR_ERROR_NO_OPTHDR_MAGIC",
"description" : "Invalid IMAGE_OPTIONAL_HEADER::Magic"
},
```
Would it be possible to add a similar check for Mach-O files?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the existing PE corruption check referenced in #281 and trace how fileinfo handles Mach-O inputs. Identify the relevant validation entry point and the existing user-facing result format before determining the equivalent Mach-O behavior. Done means fileinfo reports Mach-O corruption consistently; the issue names no test, so locate or add coverage around the discovered check.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.