Skip to content

Commit

Permalink
[Presentation API] Fix use-after-free.
Browse files Browse the repository at this point in the history
This fixes a potential UAF in PresentationConnectionCallbacks::OnSuccess.

TBR=mlamouri@chromium.org

(cherry picked from commit 42a17e3)

Bug: 1116706
Change-Id: I25fc55edf968f41bfedecbeb2054a5eae56d0de7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2361025
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#799342}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368426
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/branch-heads/4183@{#1636}
Cr-Branched-From: 740e9e8-refs/heads/master@{#782793}
  • Loading branch information
mfoltzgoogle authored and Commit Bot committed Aug 21, 2020
1 parent 9300c9c commit 6fc5082
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -64,9 +64,10 @@ void PresentationConnectionCallbacks::OnSuccess(
resolver_.Get(), presentation_info, request_);
}

resolver_->Resolve(connection_);
connection_->Init(std::move(connection_remote),
std::move(connection_receiver));

resolver_->Resolve(connection_);
}

void PresentationConnectionCallbacks::OnError(
Expand Down

0 comments on commit 6fc5082

Please sign in to comment.