From fa5e2507de596c544a3fafadce09c6ac0294d78c Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Thu, 28 Nov 2024 21:20:43 -0500 Subject: [PATCH] Initialize buffer to empty --- reprozip/native/tracer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reprozip/native/tracer.c b/reprozip/native/tracer.c index 326e9a28..09be932b 100644 --- a/reprozip/native/tracer.c +++ b/reprozip/native/tracer.c @@ -233,6 +233,7 @@ int trace_add_files_from_proc(unsigned int process, pid_t tid, size_t length = 0; size_t previous_path_size = 4096; char *previous_path = malloc(previous_path_size); + previous_path[0] = 0; const char *const fmt = "/proc/%d/maps"; int len = snprintf(&dummy, 1, fmt, tid);