aboutsummaryrefslogtreecommitdiffstats
path: root/midx.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-07-12 19:37:32 -0400
committerJunio C Hamano <gitster@pobox.com>2023-07-14 09:32:03 -0700
commita519abca02eeca7dce864717b9664c62a124e1c0 (patch)
tree0c229295314569b43ec13fa53e2e1044a74e9ccf /midx.c
parent42be681b33ef73be056fb99e3c63c6e9b9c2e7ef (diff)
downloadgit-a519abca02eeca7dce864717b9664c62a124e1c0.tar.gz
packfile.c: use checked arithmetic in `nth_packed_object_offset()`
In a similar spirit as the previous commits, ensure that we use `st_add()` or `st_mult()` when computing values that may overflow the 32-bit unsigned limit. Note that in each of these instances, we prevent 32-bit overflow already since we have explicit casts to `size_t`. So this code is OK as-is, but let's clarify it by using the `st_xyz()` helpers to make it obvious that we are performing the relevant computations using 64 bits. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.c')
0 files changed, 0 insertions, 0 deletions