aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-07-12 19:37:36 -0400
committerJunio C Hamano <gitster@pobox.com>2023-07-14 09:32:03 -0700
commite6c71f239d18af3b99af8fa2b68f16cee813d1e2 (patch)
treef707e65f5640031010e355d8bf72e04b52569359 /commit-graph.c
parentpackfile.c: use checked arithmetic in `nth_packed_object_offset()` (diff)
downloadgit-e6c71f239d18af3b99af8fa2b68f16cee813d1e2.tar.gz
git-e6c71f239d18af3b99af8fa2b68f16cee813d1e2.zip
midx.c: use `size_t`'s for fanout nr and alloc
The `midx_fanout` struct is used to keep track of a set of OIDs corresponding to each layer of the MIDX's fanout table. It stores an array of entries, along with the number of entries in the table, and the allocated size of the array. Both `nr` and `alloc` are stored as 32-bit unsigned integers. In practice, this should never cause any problems, since most packs have far fewer than 2^32-1 objects. But storing these as `size_t`'s is more appropriate, and prevents us from accidentally overflowing some result when multiplying or adding to either of these values. Update these struct members to be `size_t`'s as appropriate. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions