From: Johannes Schindelin via GitGitGadget Date: Wed, 15 Jun 2022 23:35:40 GMT Subject: [PATCH 06/11] pack-redundant: avoid using uninitialized memory Message-ID: In-Reply-To: From: Johannes Schindelin In the `add_pack()` function, we forgot to initialize the field `next`, which could potentially lead to readin uninitialized memory later. Reported by Coverity. Signed-off-by: Johannes Schindelin --- builtin/pack-redundant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index ed9b9013a5f..1f7da1f68b6 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -526,6 +526,7 @@ static struct pack_list * add_pack(struct packed_git *p) } l.all_objects_size = l.remaining_objects->size; l.unique_objects = NULL; + l.next = NULL; if (p->pack_local) return pack_list_insert(&local_packs, &l); else -- gitgitgadget