WebKit Bugzilla
Attachment 343532 Details for
Bug 187012
: Null dereference crash un ApplicationCacheGroup::startLoadingEntry()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187012-20180625132710.patch (text/plain), 2.66 KB, created by
Chris Dumez
on 2018-06-25 13:26:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-06-25 13:26:44 PDT
Size:
2.66 KB
patch
obsolete
>Subversion Revision: 233161 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cc1d3347bf85b24e17cb989b2a92f8fd57cf45cb..7bc8dc8837bc2155f4451df689f2cec05c5ff6a9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-06-25 Chris Dumez <cdumez@apple.com> >+ >+ Null dereference crash un ApplicationCacheGroup::startLoadingEntry() >+ https://bugs.webkit.org/show_bug.cgi?id=187012 >+ <rdar://problem/40793716> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add null check for m_entryLoader before calling its resource getter. If it is null, just use the >+ request URL instead of the cached resource's URL. m_entryLoader can be null because >+ ApplicationCacheResourceLoader::create() return null when CachedResourceLoader::requestRawResource() >+ fails synchronously. In such case, the completion handler gets called with a >+ ApplicationCacheResourceLoader::Error::CannotRequestResource error. >+ >+ * loader/appcache/ApplicationCacheGroup.cpp: >+ (WebCore::ApplicationCacheGroup::startLoadingEntry): >+ > 2018-06-25 Simon Fraser <simon.fraser@apple.com> > > AutoTableLayout wastes 52KB of Vector capacity on nytimes.com >diff --git a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >index d9947a2b3454a757b51deab909d1b319f67f6550..3c99b98e40c61b97af4100cb14b537f5e3bb6237 100644 >--- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >+++ b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >@@ -903,12 +903,13 @@ void ApplicationCacheGroup::startLoadingEntry() > InspectorInstrumentation::willSendRequest(m_frame, m_currentResourceIdentifier, m_frame->loader().documentLoader(), request, ResourceResponse { }); > > auto& documentLoader = *m_frame->loader().documentLoader(); >- m_entryLoader = ApplicationCacheResourceLoader::create(m_pendingEntries.begin()->value, documentLoader.cachedResourceLoader(), WTFMove(request), [this] (auto&& resourceOrError) { >+ auto requestURL = request.url(); >+ m_entryLoader = ApplicationCacheResourceLoader::create(m_pendingEntries.begin()->value, documentLoader.cachedResourceLoader(), WTFMove(request), [this, requestURL] (auto&& resourceOrError) { > if (!resourceOrError.has_value()) { > auto error = resourceOrError.error(); > if (error == ApplicationCacheResourceLoader::Error::Abort) > return; >- this->didFailLoadingEntry(error, m_entryLoader->resource()->url()); >+ this->didFailLoadingEntry(error, m_entryLoader ? m_entryLoader->resource()->url() : requestURL); > return; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187012
:
343532
|
343533