Skip to content

Commit

Permalink
Add test case for magic field in macho module.
Browse files Browse the repository at this point in the history
This should confirm an issue with the endianness of `magic` field in big-endian platforms.
  • Loading branch information
plusvic committed Jan 30, 2024
1 parent f5edf4e commit e065be6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test-macho.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ int main(int argc, char** argv)
macho.file[1].cputype == macho.fat_arch[1].cputype }",
"tests/data/tiny-universal");

assert_true_rule_file(
"import \"macho\" rule test { condition: \
macho.file[0].magic == 0xfeedface and \
macho.file[1].magic == 0xfeedfacf }",
"tests/data/tiny-universal");

// Entry points for files (LC_MAIN)

assert_true_rule_file(
Expand Down

0 comments on commit e065be6

Please sign in to comment.