genext2fs
genext2fs copied to clipboard
Fix alignment issues for strict architectures
Fixes two locations where unaligned accesses will cause bus errors on architectures that are strict about such accesses, namely sparc.
The first is in swab32_into, which is called with an offset of +1 into an unsigned char array from mklink_fs.
The second is in add2fs_from_tarball when checking the validity of a tarball, which casts a string from an unaligned position inside a struct to a long.
After these changes, the test suite passes on sparc.