diff --git a/smells/anti-patterns.md b/smells/anti-patterns.md index a059b1a..aa71410 100644 --- a/smells/anti-patterns.md +++ b/smells/anti-patterns.md @@ -880,7 +880,7 @@ end **What they avoid:** Converting untrusted strings to atoms. -**Source evidence:** `lib/elixir/lib/option_parser.ex:855` — Uses `String.to_existing_atom/1` with the `:switches` allowlist pattern. The only `String.to_atom/1` calls in library code are in compiler/macro contexts where the set is bounded. +**Source evidence:** `lib/elixir/lib/option_parser.ex:859` — Uses `String.to_existing_atom/1` with the `:switches` allowlist pattern. The only `String.to_atom/1` calls in library code are in compiler/macro contexts where the set is bounded. **Why it's bad:** Atoms are never garbage collected. User-controlled atom creation is a denial-of-service vector (1,048,576 atom limit by default). diff --git a/smells/common-mistakes.md b/smells/common-mistakes.md index b8d8470..31f6e0e 100644 --- a/smells/common-mistakes.md +++ b/smells/common-mistakes.md @@ -401,7 +401,7 @@ setup do end ``` -**Source:** `lib/logger/test/logger_test.exs:12-17` — Every Logger config change has a corresponding `on_exit` restoration. `lib/logger/test/test_helper.exs:57-62` — `capture_log` uses `after` to always restore level. +**Source:** `lib/logger/test/logger_test.exs:12-17` — Every Logger config change has a corresponding `on_exit` restoration. `lib/logger/test/test_helper.exs:57-65` — `capture_log` uses `after` to always restore level. ### When to Apply This Rule