Skip to content

Release v_escape_codegen 0.1.9

Choose a tag to compare

@zzau13 zzau13 released this 25 Apr 13:28
· 27 commits to master since this release

Release v_escape_codegen 0.1.9

This is part of a coordinated release that ships the rewritten v_escape workspace and addresses the soundness bug reported in #166. The same set of commits is delivered by every tag pushed in this batch.

Crate New version Previous published
v_escape-base 0.1.0 (initial release)
v_escape-codegen-base 0.1.0 (initial release)
v_escape-proc-macro 0.1.0 (initial release)
v_escape_codegen 0.1.9 0.1.8
v_escape 0.19.0 0.18.0
v_htmlescape 0.16.0 0.15.8
v_jsonescape 0.8.0 0.7.8
v_latexescape 0.15.0 0.14.8

Security

Fix soundness bug reported in #166: the previously published v_htmlescape <= 0.15.8, v_jsonescape <= 0.7.8 and v_latexescape <= 0.14.8 exposed scalar::_escape(&[u8], _) (and the matching SIMD entry points) as safe functions that called core::str::from_utf8_unchecked on caller-provided bytes, producing UB whenever the input was not valid UTF-8.

The crate has been rewritten so the public escape API only accepts &str. from_utf8_unchecked is now confined to a single internal unsafe fn write_slice in v_escape-base whose callers always start from a &str and only split on ASCII boundaries. The affected published versions will be yanked from crates.io.

Migration

The new API is breaking: callers that previously passed &[u8] through scalar::_escape (or any SIMD entry point) must switch to &str input. If you have raw bytes, validate them with std::str::from_utf8 before calling the escape API.

Full changelog

See CHANGELOG.md for the full list of changes, bug fixes, dependency updates and miscellaneous tasks included in this release.

Installation

cargo add v_escape_codegen@0.1.9