planetbeing/libdmg-hfsplus — pull request #8 by theuni (2014-05-09 03:49:43+00:00)
Title: Initialize checksum structs to avoid inserting unused garbage padding

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.