Skip to content

fix: correct parsing of second-instance additionalData#50154

Merged
MarshallOfSound merged 1 commit into41-x-yfrom
sam/41-x-y-bp-process-singleton-additionaldata-fix
Mar 10, 2026
Merged

fix: correct parsing of second-instance additionalData#50154
MarshallOfSound merged 1 commit into41-x-yfrom
sam/41-x-y-bp-process-singleton-additionaldata-fix

Conversation

@MarshallOfSound
Copy link
Copy Markdown
Member

Backport of #50119 to 41-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 17:59
@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes backport-check-skip Skip trop's backport validity checking 41-x-y labels Mar 9, 2026
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Mar 9, 2026
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Mar 9, 2026
@trop trop bot requested a review from a team March 9, 2026 17:59
@MarshallOfSound MarshallOfSound merged commit e78e2ca into 41-x-y Mar 10, 2026
72 checks passed
@MarshallOfSound MarshallOfSound deleted the sam/41-x-y-bp-process-singleton-additionaldata-fix branch March 10, 2026 02:22
@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

41-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