Changeset 244850 in webkit


Ignore:
Timestamp:
May 1, 2019 2:19:24 PM (5 years ago)
Author:
achristensen@apple.com
Message:

Protect against null crash in fetchDiskCacheEntries
https://bugs.webkit.org/show_bug.cgi?id=197399
<rdar://problem/47759337>

Reviewed by Antti Koivisto.

If the call to Entry::decodeStorageRecord returns nullptr in Storage::traverse, do not call the traverseHandler, which expects
that when it is called with nullptr that is the end of the traversal.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::traverse):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r244849 r244850  
     12019-05-01  Alex Christensen  <achristensen@webkit.org>
     2
     3        Protect against null crash in fetchDiskCacheEntries
     4        https://bugs.webkit.org/show_bug.cgi?id=197399
     5        <rdar://problem/47759337>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        If the call to Entry::decodeStorageRecord returns nullptr in Storage::traverse, do not call the traverseHandler, which expects
     10        that when it is called with nullptr that is the end of the traversal.
     11
     12        * NetworkProcess/cache/NetworkCache.cpp:
     13        (WebKit::NetworkCache::Cache::traverse):
     14
    1152019-05-01  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp

    r243143 r244850  
    479479
    480480        auto entry = Entry::decodeStorageRecord(*record);
    481         if (!entry) {
    482             traverseHandler(nullptr);
     481        if (!entry)
    483482            return;
    484         }
    485483
    486484        TraversalEntry traversalEntry { *entry, recordInfo };
Note: See TracChangeset for help on using the changeset viewer.