Skip to content

format.PackIndexV2.OffsetForPos does not support offsets higher than 2 GiB #3

@kourge

Description

@kourge

Per the v2 pack index format description, for an entry, a 32-bit offset with its MSB set to 1 means the the 31-bit LSBs form an index to the higher offsets table, which contains zero or more unsigned 64-bit integers that represent the true offset of an entry when the offset is greater than 2 GiB.

format.PackIndexV2.OffsetForPos currently assumes that this is never the case and always casts a 32-bit offset to an int64, even if its MSB is set to 1.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions