镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

SarAsio: don't crash the host on long endpoint names or bad channel counts - #152

Draft
eiz-claude wants to merge 2 commits into
mack/fix-15-unique-endpoint-idsfrom
mack/fix-long-endpoint-names
Draft

eiz-claude wants to merge 2 commits into
mack/fix-15-unique-endpoint-idsfrom
mack/fix-long-endpoint-names

Conversation

@eiz-claude

@eiz-claude eiz-claude commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Two ways the endpoint dialog's input crashed the host. No open issue clearly matches either; both turned up while triaging the issue list, next to the strcpy_s channel-name crash fixed in #145.

Long endpoint names. SarClient::createEndpoints copied each endpoint's name and ID into the driver request with wcscpy_s. That aborts the process (fail-fast, 0xC0000409) when the value doesn't fit the driver's 63 characters, and the dialog accepted names of any length. A name of 64 or more characters killed the DAW as soon as it started SAR.

  • Names are now truncated, and the dialog limits the name field to 63 characters.
  • An over-long ID can only come from a hand-edited configuration. It now fails the start with a log message; truncating it could make two IDs collide.

Channel count. The dialog parsed the channel count with std::stoi, which throws on an empty or non-numeric value. It now accepts 1 to 32, the driver's SAR_MAX_CHANNEL_COUNT; larger counts made endpoint creation fail later anyway. Otherwise it says so and keeps the dialog open.

Test

New long-endpoint-name scenario: a host whose endpoint names are 98 characters long, with short IDs (--id-prefix, new).

test VM result
tests without the fix host exits 0xC0000409 at start
with the fix start and stop OK, endpoints created with truncated names

The dialog changes (name limit, channel count check) aren't driven by the harness.

🤖 Generated with Claude Code

eiz and others added 2 commits October 3, 2026 10:46
Adds a long-endpoint-name scenario to the issues group: a host whose
endpoint names are 92 characters, past the driver's 63-character limit.
Layouts take --id-prefix so the IDs can stay short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SarClient copied endpoint names and IDs into the driver request with
wcscpy_s, which aborts the process when the value doesn't fit the
driver's 63 characters, and the endpoint dialog let names of any length
through. A name of 64 characters or more killed the DAW on start.
Names are now truncated (and the dialog limits them), and an over-long
ID, which can only come from an edited configuration, fails the start
with a log message instead.

The dialog also parsed the channel count with std::stoi, which throws
on an empty or non-numeric value. It now accepts 1 to 32 (the driver's
limit; larger counts made endpoint creation fail) and otherwise says so
and stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eiz-claude
eiz-claude added this pull request to stack #154 October 3, 2026 15:01
@eiz-claude eiz-claude changed the title mack/fix long endpoint names SarAsio: don't crash the host on long endpoint names or bad channel counts Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants