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

Initialize checksum structs to avoid inserting unused garbage padding #8

Closed theuni closed 9 years ago

theuni commented 10 years ago

I realize that @planetbeing is not really active or responsive here, but I'm submitting this in the event that someone who's googling this issue may stumble onto this PR.

for the fUDIFDataForkChecksum.data and fUDIFMasterChecksum.data structures, it appears as though only the first int is ever used for checksumming, but the other bytes are still written to the image. Initialize them so they don't contain random garbage.

With this change, using dmg to compress an existing dmg produces consistent output.

kleuter commented 10 years ago

Nice patch, unfortunately this project seem to be abandoned

git-j commented 9 years ago

is this required for Merge Request #7?