Add test case for magic field in macho module.

This should confirm an issue with the endianness of `magic` field in big-endian platforms.
This commit is contained in:
Victor M. Alvarez
2024-01-30 21:32:02 +01:00
parent f5edf4e5f5
commit e065be6716
+6
View File
@@ -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(