From 3e0a0d705737c77c339c3c2da6ac7d582a38dd47 Mon Sep 17 00:00:00 2001 From: lisk77 Date: Fri, 19 Sep 2025 00:01:14 +0200 Subject: [PATCH] fix(basefile): made sure file_info.hash is null instead of random memory --- src/base_file_buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/base_file_buffer.c b/src/base_file_buffer.c index b1a68d3..ada2e98 100644 --- a/src/base_file_buffer.c +++ b/src/base_file_buffer.c @@ -266,8 +266,6 @@ int write_base_file_list(BaseFileBuffer* buffer, char* info_file) { info->name, info->base_num, info->diff_num); } - printf("%s\n", tmp); - FILE* fp = fopen(info_file, "wb"); if (!fp) { perror("ERROR: cannot open path in snapshot_tree!\n"); return 0; } @@ -316,6 +314,7 @@ FileInfoBuffer* basefilebuffer_to_fileinfobuffer(BaseFileBuffer* base_buffer) { return NULL; } file_info.mode = st.st_mode; + file_info.hash = NULL; if (!file_info_buffer_push(file_buffer, file_info)) { free(file_info.name);