aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-14 17:04:36 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-14 17:04:36 +0900
commit794c9798893670dcf8f52952487217cb04a478c4 (patch)
treef2f114fab631815094b0f04a545f51b8a038c63d
parente85ae279b0d58edc2f4c3fd5ac391b51e1223985 (diff)
parentfe4e60759bfbf4eaca17949d3bbb204bb5c908a2 (diff)
downloadgit-794c9798893670dcf8f52952487217cb04a478c4.tar.gz
Merge branch 'tc/last-modified-active-paths-optimization'
Recent optimization to "last-modified" command introduced use of uninitialized block of memory, which has been corrected. * tc/last-modified-active-paths-optimization: last-modified: fix use of uninitialized memory
-rw-r--r--builtin/last-modified.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/last-modified.c b/builtin/last-modified.c
index b0ecbdc540..cc5fd2e795 100644
--- a/builtin/last-modified.c
+++ b/builtin/last-modified.c
@@ -327,7 +327,7 @@ static void process_parent(struct last_modified *lm,
if (!(parent->object.flags & PARENT1))
active_paths_free(lm, parent);
- memset(lm->scratch->words, 0x0, lm->scratch->word_alloc);
+ memset(lm->scratch->words, 0x0, lm->scratch->word_alloc * sizeof(eword_t));
diff_queue_clear(&diff_queued_diff);
}