mirror of
https://github.com/lahfir/agent-desktop.git
synced 2026-08-16 12:03:46 +00:00
AdDragParams is embedded by value in AdAction, so its 8-byte growth grew the struct C callers pass to ad_execute_action with no size guard — old-layout callers under-allocate and stack garbage becomes a live drop_delay_ms. Adds AD_ACTION_SIZE / ad_action_size() with a layout pin, matching the AdRefEntry pattern. Also hardens the input boundary: C strings are decoded with a bounded NUL scan (AD_MAX_STRING_BYTES, sized for CLI argv parity) so a missing terminator cannot walk arbitrary memory, and the single coarse 1024 array cap becomes published per-field caps (AD_MAX_REF_STATES/ACTIONS/ PATH_DEPTH) with tests just over each limit. |
||
|---|---|---|
| .. | ||
| examples | ||
| include | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| cbindgen.toml | ||