diff options
-rw-r--r-- | block/dmg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/dmg.c b/block/dmg.c index e455886d2b..46a8a5a8b1 100644 --- a/block/dmg.c +++ b/block/dmg.c @@ -151,9 +151,11 @@ static int dmg_open(BlockDriverState *bs, QDict *options, int flags, ret = offset; goto fail; } - offset -= 0x1d8; + /* go the beginning of the UDIF trailer */ + offset -= 0x200; - ret = read_uint64(bs, offset, &info_begin); + /* offset of resource fork (RsrcForkOffset) */ + ret = read_uint64(bs, offset + 0x28, &info_begin); if (ret < 0) { goto fail; } else if (info_begin == 0) { |