planetbeing / libdmg-hfsplus

Portable libraries and utilities that manipulate HFS+ volumes and Apple's DMG images
GNU General Public License v3.0
161 stars 104 forks source link

large file problems: uint32_t typo #3

Open throwaway-zz opened 13 years ago

throwaway-zz commented 13 years ago

There's an embarrassing typo in includes/dmg/dmg.h that prevents libdmg from reading large dmgs: the return value of readUInt64 should be uint64_t, not uint32_t.

A more cosmetic issue is that there's a line in hfs/hfslib.c that prints the total filesystem size, and it has some 32-bit values that need to be cast to 64-bit before multiplying.

After fixing those issues, libdmg seems to work fine at listing and extracting files from a 7 GB dmg.

nopara73 commented 5 years ago

There's something going on here regarding this issue. Not sure I fully understand though: http://www.nathancoulson.com/proj_cross_tools.php
http://www.nathancoulson.com/proj/cross/libdmg-hfsplus-fixes-1.patch