Skip to content

fix: correct parsing of second-instance additionalData#50162

Merged
codebytere merged 1 commit into40-x-yfrom
sam/40-x-y-bp-process-singleton-additionaldata-fix
Mar 10, 2026
Merged

fix: correct parsing of second-instance additionalData#50162
codebytere merged 1 commit into40-x-yfrom
sam/40-x-y-bp-process-singleton-additionaldata-fix

Conversation

@MarshallOfSound
Copy link
Copy Markdown
Member

Backport of #50119 to 40-x-y.

See that PR for details.

Notes: Fixed an issue where additionalData passed to app.requestSingleInstanceLock on Windows could be truncated or fail to deserialize in the primary instance's second-instance event.

- POSIX: validate StringToSizeT result and token count when splitting
  the socket message into argv and additionalData; previously a
  malformed message could produce incorrect slicing.
- Windows: base64-encode additionalData before embedding in the
  null-delimited wchar_t buffer. The prior reinterpret_cast approach
  dropped everything after the first aligned 0x0000 in the serialized
  payload, so complex objects could arrive truncated.

Manually backported from #50119
@MarshallOfSound MarshallOfSound requested a review from a team as a code owner March 9, 2026 18:54
@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes backport-check-skip Skip trop's backport validity checking 40-x-y labels Mar 9, 2026
@trop trop bot requested a review from a team March 9, 2026 18:54
@codebytere codebytere merged commit 4480c35 into 40-x-y Mar 10, 2026
145 of 153 checks passed
@codebytere codebytere deleted the sam/40-x-y-bp-process-singleton-additionaldata-fix branch March 10, 2026 08:42
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Mar 10, 2026

Release Notes Persisted

Fixed an issue where additionalData passed to app.requestSingleInstanceLock on Windows could be truncated or fail to deserialize in the primary instance's second-instance event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

40-x-y backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants