From 661d8df4d9f2580d3149e198aab03dbf4e3d3283 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 24 Oct 2026 21:41:33 -0700 Subject: [PATCH] fix(rust-volume-server): read argv via args_os so non-UTF8 args cannot panic --- rust/volume_server/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/volume_server/src/main.rs b/rust/volume_server/src/main.rs index de66daf401..a11c06dafb 100644 --- a/rust/volume_server/src/main.rs +++ b/rust/volume_server/src/main.rs @@ -80,7 +80,10 @@ fn main() -> ExitCode { } fn run() -> Result<(), String> { - let args: Vec = env::args().skip(1).collect(); + let args: Vec = env::args_os() + .skip(1) + .map(|a| a.to_string_lossy().into_owned()) + .collect(); if args.iter().any(|a| a == "-h" || a == "--help") { print_help();