aboutsummaryrefslogtreecommitdiffstats
path: root/diff.h
diff options
context:
space:
mode:
authorToon Claes <toon@iotcl.com>2025-11-28 17:37:13 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-29 14:16:53 -0800
commitfe4e60759bfbf4eaca17949d3bbb204bb5c908a2 (patch)
tree7641d932f697f46764a8e5284ed1cdfc53b5bd94 /diff.h
parent2a04e8c293766a4976ceceb4c663dd2963e0339e (diff)
downloadgit-fe4e60759bfbf4eaca17949d3bbb204bb5c908a2.tar.gz
last-modified: fix use of uninitialized memory
git-last-modified(1) uses a scratch bitmap to keep track of paths that have been changed between commits. To avoid reallocating a bitmap on each call of process_parent(), the scratch bitmap is kept and reused. Although, it seems an incorrect length is passed to memset(3). `struct bitmap` uses `eword_t` to for internal storage. This type is typedef'd to uint64_t. To fully zero the memory used by the bitmap, multiply the length (saved in `struct bitmap::word_alloc`) by the size of `eword_t`. Reported-by: Anders Kaseorg <andersk@mit.edu> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
0 files changed, 0 insertions, 0 deletions