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

Unified Diff: chrome_frame/chrome_active_document.cc

Issue 3421029: Fix a c_str() use-after-free bug in the chrome frame code. (Closed)
Patch Set: Eliminate temporary Created 10 years, 3 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: chrome_frame/chrome_active_document.cc
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index 516dd0988b1a4f99d98bee1c6cff119821415dc5..78f85f2a718a7f003738835f741a63d95468f74a 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -931,8 +931,8 @@ void ChromeActiveDocument::OnAttachExternalTab(int tab_handle,
HRESULT hr = S_OK;
if (popup_manager_) {
- LPCWSTR popup_wnd_url = UTF8ToWide(params.url.spec()).c_str();
- hr = popup_manager_->EvaluateNewWindow(popup_wnd_url, NULL, url_,
+ const std::wstring& url_wide = UTF8ToWide(params.url.spec());
+ hr = popup_manager_->EvaluateNewWindow(url_wide.c_str(), NULL, url_,
NULL, FALSE, flags, 0);
}
// Allow popup
« 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