mirror of
https://github.com/VirusTotal/yara.git
synced 2026-10-11 22:49:58 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user