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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implementation of ChromeActiveDocument 5 // Implementation of ChromeActiveDocument
6 #include "chrome_frame/chrome_active_document.h" 6 #include "chrome_frame/chrome_active_document.h"
7 7
8 #include <hlink.h> 8 #include <hlink.h>
9 #include <htiface.h> 9 #include <htiface.h>
10 #include <initguid.h> 10 #include <initguid.h>
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 return; 924 return;
925 } 925 }
926 DWORD flags = 0; 926 DWORD flags = 0;
927 if (params.user_gesture) 927 if (params.user_gesture)
928 flags = NWMF_USERREQUESTED; 928 flags = NWMF_USERREQUESTED;
929 else if (popup_allowed_) 929 else if (popup_allowed_)
930 flags = NWMF_USERALLOWED; 930 flags = NWMF_USERALLOWED;
931 931
932 HRESULT hr = S_OK; 932 HRESULT hr = S_OK;
933 if (popup_manager_) { 933 if (popup_manager_) {
934 LPCWSTR popup_wnd_url = UTF8ToWide(params.url.spec()).c_str(); 934 const std::wstring& url_wide = UTF8ToWide(params.url.spec());
935 hr = popup_manager_->EvaluateNewWindow(popup_wnd_url, NULL, url_, 935 hr = popup_manager_->EvaluateNewWindow(url_wide.c_str(), NULL, url_,
936 NULL, FALSE, flags, 0); 936 NULL, FALSE, flags, 0);
937 } 937 }
938 // Allow popup 938 // Allow popup
939 if (hr == S_OK) { 939 if (hr == S_OK) {
940 BaseActiveX::OnAttachExternalTab(tab_handle, params); 940 BaseActiveX::OnAttachExternalTab(tab_handle, params);
941 return; 941 return;
942 } 942 }
943 943
944 automation_client_->BlockExternalTab(params.cookie); 944 automation_client_->BlockExternalTab(params.cookie);
945 } 945 }
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 web_browser2->put_Height(dimensions_.height()); 1297 web_browser2->put_Height(dimensions_.height());
1298 web_browser2->put_Left(dimensions_.x()); 1298 web_browser2->put_Left(dimensions_.x());
1299 web_browser2->put_Top(dimensions_.y()); 1299 web_browser2->put_Top(dimensions_.y());
1300 web_browser2->put_MenuBar(VARIANT_FALSE); 1300 web_browser2->put_MenuBar(VARIANT_FALSE);
1301 web_browser2->put_ToolBar(VARIANT_FALSE); 1301 web_browser2->put_ToolBar(VARIANT_FALSE);
1302 1302
1303 dimensions_.set_height(0); 1303 dimensions_.set_height(0);
1304 dimensions_.set_width(0); 1304 dimensions_.set_width(0);
1305 } 1305 }
1306 } 1306 }
OLDNEW
« 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