X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e7c99d92bf4e4d1189c904195ed317951f9a35ad..d71b494cb68360acda2a347ec4703076060aee9e:/bsd/hfs/hfscommon/Catalog/Catalog.c diff --git a/bsd/hfs/hfscommon/Catalog/Catalog.c b/bsd/hfs/hfscommon/Catalog/Catalog.c index d200f63ec..0e94bef13 100644 --- a/bsd/hfs/hfscommon/Catalog/Catalog.c +++ b/bsd/hfs/hfscommon/Catalog/Catalog.c @@ -816,7 +816,7 @@ GetDirEntrySize(BTreeIterator *bip, ExtendedVCB * vol) OSErr PositionIterator(CatalogIterator *cip, UInt32 offset, BTreeIterator *bip, UInt16 *op) { -#define CAT_START_OFFSET 0 +#define CAT_START_OFFSET (2 * sizeof(struct hfsdotentry)) ExtendedVCB * vol; FCB * fcb; OSErr result = 0; @@ -877,7 +877,7 @@ PositionIterator(CatalogIterator *cip, UInt32 offset, BTreeIterator *bip, UInt16 pid = *idp; curOffset = CAT_START_OFFSET; - nextOffset = GetDirEntrySize(bip, vol); + nextOffset = CAT_START_OFFSET + GetDirEntrySize(bip, vol); while (nextOffset < offset) { result = BTIterateRecord( fcb, kBTreeNextRecord, bip, NULL, NULL );