diff options
author | Matt Cooper <vtbassmatt@gmail.com> | 2021-11-02 15:46:10 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-03 11:22:27 -0700 |
commit | d6a09e795d77ddc76c5141047340dc3cb62355f4 (patch) | |
tree | 37f068272f06f44d2b3ddfe77d700e74e8bc8772 /.github | |
parent | git-compat-util: introduce more size_t helpers (diff) | |
download | tgif-d6a09e795d77ddc76c5141047340dc3cb62355f4.tar.xz |
odb: guard against data loss checking out a huge file
This introduces an additional guard for platforms where `unsigned long`
and `size_t` are not of the same size. If the size of an object in the
database would overflow `unsigned long`, instead we now exit with an
error.
A complete fix will have to update _many_ other functions throughout the
codebase to use `size_t` instead of `unsigned long`. It will have to be
implemented at some stage.
This commit puts in a stop-gap for the time being.
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Matt Cooper <vtbassmatt@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions