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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard Control UpdateAppearance/Settings against UAF #17770

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

DHowett
Copy link
Member

@DHowett DHowett commented Aug 22, 2024

When you close a window, it naturally loses focus.

We were trying to use members of the control to update its appearance on focus loss after it got torn down.

Closes #17520

@DHowett DHowett enabled auto-merge (squash) August 22, 2024 17:00
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Settings Issues related to settings and customizability, for console or terminal Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. Severity-Crash Crashes are real bad news. labels Aug 22, 2024
@@ -717,11 +717,14 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// terminal.
co_await wil::resume_foreground(Dispatcher());

_core.UpdateSettings(settings, unfocusedAppearance);
Copy link
Member Author

Choose a reason for hiding this comment

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

yeah this function had a weakThis and then just, like, gave up on it.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

image

@DHowett DHowett merged commit eabebc4 into main Aug 22, 2024
20 checks passed
@DHowett DHowett deleted the dev/duhowett/do-not-crash-during-window-teardown branch August 22, 2024 17:55
DHowett added a commit that referenced this pull request Aug 22, 2024
When you close a window, it naturally loses focus.

We were trying to use members of the control to update its appearance on
focus loss after it got torn down.

Closes #17520

(cherry picked from commit eabebc4)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgSIM6I
Service-Version: 1.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. Severity-Crash Crashes are real bad news.
Projects
3 participants