summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-07-10 11:39:33 +0000
committerJunio C Hamano <gitster@pobox.com>2026-07-10 08:13:55 -0700
commit436ef7c1e4131c31ae1a9152261c2c67c7affa21 (patch)
tree5ba4ac5d1a3c86b502cf62869ed4ebbc507a6459 /git-commit-script
parentf5887e1ec0c89e1cc60dfbfb229a11e72e616cda (diff)
pack-bitmap: handle missing bitmap for base MIDX
When `prepare_midx_bitmap_git()` is called to load the bitmap for a chained MIDX's base layer, if the base MIDX does not have an associated bitmap file (e.g., it was not generated, or was deleted by gc), the return value is NULL. It is then stored in `bitmap_git->base` and immediately dereferenced on the next line. This can happen in practice with incremental MIDX chains: the base MIDX may have been written without `--write-bitmap-index`, or the bitmap may have been pruned while the incremental layer's bitmap still references it. Check the return value and go to the cleanup label (which unmaps the current bitmap and returns -1) so the caller falls back to non-bitmap object enumeration, matching the handling of other bitmap loading failures in the same function. Pointed out by Coverity. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit-script')
0 files changed, 0 insertions, 0 deletions