fix: ASan out-of-bounds argv in cli test, cppcheck uninit rate buffer

This commit is contained in:
2026-09-15 23:53:49 +02:00
parent c41bfb2cdb
commit 3f5b0250f4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -96,8 +96,8 @@ static void report_transfer_stats(const Config* config, int total_files,
double elapsed = difftime(time(NULL), start);
double rate = elapsed > 0.0 ? (double)total_bytes / elapsed : 0.0;
char total_buffer[32];
char rate_buffer[32];
char human_rate[32];
char rate_buffer[32] = {0};
char human_rate[32] = {0};
const char* total = stats_bytes(config, total_bytes, total_buffer, sizeof(total_buffer));
const char* rate_str = rate_buffer;
if (config->human_readable) {