Skip to content

Commit

Permalink
Merge pull request #35 from AleksArt000/main
Browse files Browse the repository at this point in the history
bruh
  • Loading branch information
ilovethensa authored Dec 1, 2023
2 parents e66d610 + 2dceacd commit f7e628b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f7e628b

Please sign in to comment.