Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bruh #35

Merged
merged 1 commit into from
Dec 1, 2023
Merged

bruh #35

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
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);
}

// Append the current line of output to the result
strcat(result, path);

Check warning on line 47 in src/exec.c

View workflow job for this annotation

GitHub Actions / c-linter

/src/exec.c:47:5 [clang-analyzer-security.insecureAPI.strcpy]

Call to function 'strcat' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcat'. CWE-119
}

// Close the command execution
Expand Down
Loading