Skip to content

ssh: Remove nowarn_possibly_unsafe_function compile directives#11006

Open
u3s wants to merge 1 commit intoerlang:masterfrom
u3s:kuba/ssh/remove-unsafe-directives/OTP-20066
Open

ssh: Remove nowarn_possibly_unsafe_function compile directives#11006
u3s wants to merge 1 commit intoerlang:masterfrom
u3s:kuba/ssh/remove-unsafe-directives/OTP-20066

Conversation

@u3s
Copy link
Copy Markdown
Contributor

@u3s u3s commented Apr 13, 2026

Replace binary_to_atom/1 with binary_to_existing_atom/1 in ssh_transport (valid_key_sha_alg_ec/2, public_algo/1). The input comes from ssh_message:oid2ssh_curvename/1 which returns a fixed set of 5 binaries whose atoms already exist as literals in the same module.

Replace list_to_atom/1 with an explicit pattern match in ssh_connection (pty_default_dimensions/2). The Dimension argument is always the hardcoded atom width or height.

Add a justification comment for the kept file:consult/1 directive in ssh_options — the file path is operator-controlled, not from wire data.

Replace binary_to_atom/1 with binary_to_existing_atom/1 in
ssh_transport (valid_key_sha_alg_ec/2, public_algo/1). The input
comes from ssh_message:oid2ssh_curvename/1 which returns a fixed
set of 5 binaries whose atoms already exist as literals in the
same module.

Replace list_to_atom/1 with an explicit pattern match in
ssh_connection (pty_default_dimensions/2). The Dimension argument
is always the hardcoded atom width or height.

Add a justification comment for the kept file:consult/1 directive
in ssh_options — the file path is operator-controlled, not from
wire data.
@u3s u3s self-assigned this Apr 13, 2026
@u3s u3s added the team:PS Assigned to OTP team PS label Apr 13, 2026
@u3s u3s requested a review from Mikaka27 April 13, 2026 13:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

CT Test Results

    2 files     29 suites   27m 19s ⏱️
  499 tests   493 ✅  6 💤 0 ❌
1 708 runs  1 680 ✅ 28 💤 0 ❌

Results for commit 8fca863.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants