Skip to content

Fix MacOS CI#295

Open
jbx81-1337 wants to merge 5 commits into
rapid7:masterfrom
jbx81-1337:fix/macos-deprecated-functions
Open

Fix MacOS CI#295
jbx81-1337 wants to merge 5 commits into
rapid7:masterfrom
jbx81-1337:fix/macos-deprecated-functions

Conversation

@jbx81-1337

Copy link
Copy Markdown

fixing macos ci...

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the fs_mkdir implementation to be safer on macOS/clang by reducing unsafe string formatting and centralizing buffer sizing for path construction.

Changes:

  • Introduces a single computed max buffer length (base_max_len) for base_dir/tmp allocations.
  • Replaces sprintf calls with bounded snprintf when building intermediate directory paths.

Impact Analysis:

  • Blast radius: medium—affects directory-creation behavior for the stdapi filesystem “mkdir” handler and any downstream callers that rely on it; exact external consumers Unknown from diff.
  • Data and contract effects: no schema/payload changes identified; behavior can change on edge-case paths (e.g., root/empty components) and for very long paths if sizing/truncation occurs.
  • Rollback and test focus: easy rollback (single function change); validate mkdir with absolute + relative paths, nested paths, trailing slashes, and the "/" edge case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mettle/src/stdapi/fs/file.c Outdated
Comment thread mettle/src/stdapi/fs/file.c

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread mettle/src/stdapi/fs/file.c
Co-authored-by: Copilot Autofix powered by AI <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread mettle/src/stdapi/fs/file.c Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants