summaryrefslogtreecommitdiff
path: root/cvs-fast-export/0002-Address-GitLab-issue-69-Segfault-due-to-uninitialize.patch
blob: bca9277d790b3164f51349cff9b2f328b6b9a272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 160f2478f28f36b536ffbc2a1b2cd8e5053106eb Mon Sep 17 00:00:00 2001
From: "Eric S. Raymond" <esr@thyrsus.com>
Date: Tue, 15 Oct 2024 13:25:18 -0400
Subject: [PATCH 2/4] Address GitLab issue #69: Segfault due to uninitialized
 pack_frame->sdirs

---
 treepack.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/treepack.c b/treepack.c
index fc8b76c..b385460 100644
--- a/treepack.c
+++ b/treepack.c
@@ -212,6 +212,7 @@ void revdir_pack_init(void) {
 	frames[0].dir = root_dir;
 	frames[0].dirs = xmalloc(0, __func__);
 	frames[0].ndirs = 0;
+	frame->sdirs = 0;
 	frames[0].hash = hash_init();
 }
 
@@ -256,6 +257,7 @@ void revdir_pack_add(const cvs_commit *file, const master_dir *dir) {
 			frame->dir = first_subdir(dir, parent);
 			frame->dirs = xmalloc(0, __func__);
 			frame->ndirs = 0;
+			frame->sdirs = 0;
 			frame->hash = hash_init();
 			continue;
 		}
-- 
2.47.1