Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: potential null dereference in normalizeSpawnArguments() patch #42260

Merged

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented May 23, 2024

Description of Change

The old version of this patch has code that can call options.env.foo = bar even if options.env is null. This PR moves the pre-existing upstream Node line const env = options.env || process.env to be declared earlier in the function so that we can use env safely here.

CC @deepak1556, @mlaurencin since this upstreams a minor cleanup from the Microsoft build's patchset
CC @VerteDinde -- Keeley, I can't tell if you wrote the patch but your name is in the From: header so you're a stakeholder 馃樃

Checklist

Release Notes

Notes: none

Use upstream's practice of using `env = options.env || process.env`.
Previously, we were unconditionally assigning CRASHDUMP_SIGNAL_FD
and CRASHPAD_HANDLER_PID to options.env.
@ckerr ckerr added semver/patch backwards-compatible bug fixes target/29-x-y PR should also be added to the "29-x-y" branch. target/30-x-y PR should also be added to the "30-x-y" branch. target/31-x-y PR should also be added to the "31-x-y" branch. labels May 23, 2024
@ckerr ckerr requested a review from a team as a code owner May 23, 2024 17:30
@electron-cation electron-cation bot added the new-pr 馃尡 PR opened in the last 24 hours label May 23, 2024
Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@electron-cation electron-cation bot removed the new-pr 馃尡 PR opened in the last 24 hours label May 24, 2024
@codebytere codebytere merged commit bb4374e into main May 27, 2024
26 of 28 checks passed
@codebytere codebytere deleted the fix/potential-null-object-ref-in-normalizeSpawnArguments branch May 27, 2024 08:41
Copy link

release-clerk bot commented May 27, 2024

No Release Notes

@trop
Copy link
Contributor

trop bot commented May 27, 2024

I was unable to backport this PR to "29-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot removed the target/29-x-y PR should also be added to the "29-x-y" branch. label May 27, 2024
@trop
Copy link
Contributor

trop bot commented May 27, 2024

I was unable to backport this PR to "30-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/29-x-y and removed target/30-x-y PR should also be added to the "30-x-y" branch. labels May 27, 2024
@trop
Copy link
Contributor

trop bot commented May 27, 2024

I was unable to backport this PR to "31-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/30-x-y needs-manual-bp/31-x-y and removed target/31-x-y PR should also be added to the "31-x-y" branch. labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants