From 5c2724fd2273ca0263e51c4246ef11f4fc697663 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sat, 26 Sep 2026 18:12:21 -0700 Subject: [PATCH] fix(env): filter all ASCII control characters from leading args The check for unprintable leading arguments added by firmware used c < 0x1f, which missed 0x1f itself. Use is_ascii_control() instead. --- crates/eficore/src/env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/eficore/src/env.rs b/crates/eficore/src/env.rs index ccfb7dc..f054f60 100644 --- a/crates/eficore/src/env.rs +++ b/crates/eficore/src/env.rs @@ -52,7 +52,7 @@ pub fn args() -> Result> { .next() // Filter out unprintable characters and backticks. // Both of which have been observed in the wild. - .map(|c| c < 0x1f as char || c == '`') + .map(|c| c.is_ascii_control() || c == '`') .unwrap_or(false) }) .collect();