File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1850,7 +1850,11 @@ const FileHeader = struct {
1850
1850
return magic_number == std .macho .MH_MAGIC or
1851
1851
magic_number == std .macho .MH_MAGIC_64 or
1852
1852
magic_number == std .macho .FAT_MAGIC or
1853
- magic_number == std .macho .FAT_MAGIC_64 ;
1853
+ magic_number == std .macho .FAT_MAGIC_64 or
1854
+ magic_number == std .macho .MH_CIGAM or
1855
+ magic_number == std .macho .MH_CIGAM_64 or
1856
+ magic_number == std .macho .FAT_CIGAM or
1857
+ magic_number == std .macho .FAT_CIGAM_64 ;
1854
1858
}
1855
1859
1856
1860
pub fn isExecutable (self : * FileHeader ) bool {
@@ -1875,6 +1879,11 @@ test FileHeader {
1875
1879
h .bytes_read = 0 ;
1876
1880
h .update (& macho64_magic_bytes );
1877
1881
try std .testing .expect (h .isExecutable ());
1882
+
1883
+ const macho64_cigam_bytes = [_ ]u8 { 0xFE , 0xED , 0xFA , 0xCF };
1884
+ h .bytes_read = 0 ;
1885
+ h .update (& macho64_cigam_bytes );
1886
+ try std .testing .expect (h .isExecutable ());
1878
1887
}
1879
1888
1880
1889
// Result of the `unpackResource` operation. Enables collecting errors from
You can’t perform that action at this time.
0 commit comments