Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pack: cast the number of objects to size_t #6584

Merged
merged 1 commit into from Jul 14, 2023
Merged

Conversation

carlosmn
Copy link
Member

Similar to a previous change where we had to change the casting when loading the index file, we also need to make sure we don't restrict the numbers to 32-bit when looking up objects in packfiles.

This was done about three years ago in git itself, but we never got he update in this library.


This is the potential bug I mention in #6583 where failing to parse the multi-pack index we then failed to parse the regular index as well. This is what git did in git/git@f86f769

Similar to a previous change where we had to change the casting when loading the
index file, we also need to make sure we don't restrict the numbers to 32-bit
when looking up objects in packfiles.

This was done about three years ago in git itself, but we never got he update in
this library.
@ethomson
Copy link
Member

Makes sense -- thanks!

@ethomson ethomson merged commit 40ed228 into main Jul 14, 2023
25 of 26 checks passed
@ethomson ethomson added the bug label Jul 15, 2023
@ethomson ethomson deleted the cmn/pack-index-size branch July 17, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants