diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 22:52:32 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 22:52:32 +0000 |
commit | 7057f4f61731dc8373897957c821bffc6f99082c (patch) | |
tree | 4eeddc5fd01d983dfc362671a0ade0be9d03b204 /chrome_frame | |
parent | 8eac33acb70e2aeb292bb3eb0897c384d942166f (diff) | |
download | chromium_src-7057f4f61731dc8373897957c821bffc6f99082c.zip chromium_src-7057f4f61731dc8373897957c821bffc6f99082c.tar.gz chromium_src-7057f4f61731dc8373897957c821bffc6f99082c.tar.bz2 |
Fix a chrome frame crash reported on the crash server in our bind status callback OnResponse implementation. Crash
occurs while dereferencing a NULL delegate.
Fix is to add a check for the same. This could happen if the binding was stopped before receiving the OnResponse notification.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=43927
Bug=43927
Review URL: http://codereview.chromium.org/2060002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/urlmon_url_request.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index 56d4b80..68296a1 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -593,6 +593,11 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode, DCHECK_EQ(thread_, PlatformThread::CurrentId()); DLOG(INFO) << __FUNCTION__ << me() << "headers: \n" << response_headers; + if (!delegate_) { + DLOG(WARNING) << "Invalid delegate"; + return E_FAIL; + } + std::string raw_headers = WideToUTF8(response_headers); delegate_->AddPrivacyDataForUrl(url(), "", 0); |