Menu

#31 Mach-O FAT files crash HTE

fatal errors
open
nobody
None
5
2012-02-29
2012-02-29
No

Using the latest CVS, loading a Mach-O FAT file will crash HTE. The problem is that the 0xcafebabe magic is ambiguous between a Java class file and a Mach-O FAT header. A patch to fix it is attached. Tested on both a class file and a Mach-O FAT file.

Discussion

  • Jason Spence

    Jason Spence - 2012-02-29
     
  • Sebastian Biallas

    Can you send me a FAT file? I don't really like the patch but I commited in anyway. There yould be a cleaner fix.

     
  • Jason Spence

    Jason Spence - 2012-03-05
     
  • Jason Spence

    Jason Spence - 2012-03-05

    I'm not happy about the way the disambiguation works either, but it's the same logic that file(1) uses. Have a look at the cafebabe file in the file(1) magic database.

    I've attached a copy of /bin/ls from a mac for verification.

     

Log in to post a comment.