From 2dceacdd19b04638981e3a21fb84e518b7d3aa75 Mon Sep 17 00:00:00 2001 From: AleksArt Date: Fri, 1 Dec 2023 21:58:28 +0100 Subject: [PATCH] bruh --- src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec.c b/src/exec.c index b92d214..503a8ab 100755 --- a/src/exec.c +++ b/src/exec.c @@ -38,7 +38,7 @@ char* exec(const char* cmd) size_t path_len = strlen(path); // Check if the result buffer needs to be resized to accommodate the output - if (result_len + path_len > result_size) { + if (result_len + path_len + 1 > result_size) { // Resize the result buffer to ensure it can hold the entire output result = (char*)realloc(result, result_len + path_len + 1); }