Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

rustaudio/cpal
master @ e22fb7e
2
Fixes
0
CVEs
HIGH
Peak severity
0.0%
Coverage
Highlights
Data Race: 1 prior fix. Scrutinize any change in this area.
src/host/aaudio/mod.rs: most-fixed (1 issue). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Memory Safety: Misaligned temporary buffers, missing null pointer checks, and unsafe conversions of raw native pointers into Rust slices via `slice::from_raw_parts` can lead to undefined behavior, memory corruption, or segmentation faults during audio callback execution.
Data Race: Exposing stream types as `Sync` without proper internal synchronization allows multiple threads to access underlying native Android AAudio structures concurrently, resulting in data races and unstable stream states.