fix: replace `from_utf8_unchecked` with `from_utf8` in SQLite column name handling (#4221)
* fix: replace from_utf8_unchecked with from_utf8 in SQLite statement handle Replace all uses of `from_utf8_unchecked` with safe `from_utf8` in the SQLite statement handle to fix a soundness issue. SQLite allows non-UTF-8 column names via its C API, but `from_utf8_unchecked` assumes valid UTF-8 without checking. This can produce invalid `&str` values through a safe public API, which is undefined behavior in Rust. Using `from_utf8().expect()` instead converts potential UB into a defined panic with a clear message. There is no behavioral change for valid UTF-8 inputs, which covers all practical usage. Fixes launchbadge/sqlx#4192 * style: run rustfmt on handle.rs
B
barry committed
4249cb49b4939f141014845c4e9611451b1873f5
Parent: b6cb1e3
Committed by GitHub <noreply@github.com>
on 4/9/2026, 6:24:50 PM