Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1246)

Unified Diff: pdf/instance.cc

Issue 427583003: Fix UAF in chrome_pdf::Instance::GetURL() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better comment Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/instance.cc
diff --git a/pdf/instance.cc b/pdf/instance.cc
index 0feeff4b8b9709f1ec023c7f72d81f600e607729..a5c529e7c848cbbb7d26faf4611537ddd0310b18 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -307,6 +307,9 @@ Instance::Instance(PP_Instance instance)
}
Instance::~Instance() {
+ // The engine may try to access this instance during its destruction.
+ // Make sure this happens early while the instance is still intact.
+ engine_.reset();
RemovePerInstanceObject(kPPPPdfInterface, this);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698