fix: prevent fuzz-found panics on multi-byte input#513
Merged
Conversation
Two fuzz-found panics: 1. interpreter/mod.rs: arithmetic evaluator used char indices as byte indices when slicing expressions, causing panic on multi-byte input. Fix: precompute byte offsets from char_indices(). 2. parser/mod.rs: single-char quoted array subscript (e.g. `"`) passed starts_with/ends_with checks but `[1..0]` panicked. Fix: require len >= 2 before stripping quotes. https://claude.ai/code/session_0146td5PgBYtjqsrWyZYLM8b
…cripts Add 3 new proptest properties to catch the class of bugs that caused the fuzz CI failures: - arithmetic_multibyte_no_panic: multi-byte chars in arithmetic exprs - parser_subscript_no_panic: degenerate array subscript inputs - lexer_multibyte_no_panic: multi-byte chars in lexer input These run 16 cases each in <0.02s total, negligible CI impact. https://claude.ai/code/session_0146td5PgBYtjqsrWyZYLM8b
chaliy
pushed a commit
that referenced
this pull request
Mar 9, 2026
- Add atomic-polyfill advisory ignore in deny.toml (upstream monty dep) - Fix trap incorrectly listed as security exclusion in compatibility.md - Update POSIX special built-in count to 14/15 (trap is implemented) - Update Quick Status table with accurate command counts - Add custom builtins feature to README.md - Add 2>&1 to README.md redirections list - Add Unreleased section to CHANGELOG.md for PR #513 https://claude.ai/code/session_01NdiHcfCjDaa8o5uG1Zebtq
4 tasks
yonas
pushed a commit
to yonasBSD/bashkit
that referenced
this pull request
Mar 10, 2026
## Summary - Run full maintenance checklist per `specs/012-maintenance.md` - Fix doc inconsistencies found during audit - Update advisory ignores for transitive dependencies ## Changes - **deny.toml**: Add `RUSTSEC-2023-0089` (atomic-polyfill) to advisory ignores — unmaintained transitive dep via monty → postcard → heapless that we can't control - **CHANGELOG.md**: Add Unreleased section tracking PR everruns#513 merged after v0.1.9 - **compatibility.md**: Fix `trap` incorrectly listed as security exclusion (only `exec` is excluded); update POSIX special built-in count to 14/15; refresh Quick Status table with accurate command counts by category - **README.md**: Add "Custom builtins" feature; add `2>&1` to redirections list - **specs/009-implementation-status.md**: Update POSIX special built-in count to 14/15 ## Maintenance audit results - All 1522 unit tests pass - All 16 examples compile and run - clippy/fmt clean - cargo-deny: clean (with documented advisory ignores) - Doc tests: 84 pass - Python ruff: clean ## Test plan - [x] `cargo test --all-features` — all 1522 tests pass - [x] `cargo clippy --all-targets -- -D warnings` — clean - [x] `cargo fmt --check` — clean - [x] Doc-only and config changes, no behavioral changes to verify --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
éin$((expr)))begin > endslice panic in parser when array subscript is a single quote char (e.g.${arr["]})Test plan
cargo fmt --checkcleancargo clippy --all-targets --all-features -- -D warningscleancargo test --all-featuresall pass