Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e7024fba254b60a10ae4232bfc40a9c84ea2cf6
      
https://github.com/WebKit/WebKit/commit/8e7024fba254b60a10ae4232bfc40a9c84ea2cf6
  Author: Chris Dumez <[email protected]>
  Date:   2023-06-12 (Mon, 12 Jun 2023)

  Changed paths:
    M Source/WebCore/loader/cache/MemoryCache.cpp

  Log Message:
  -----------
  Potential null dereference of cached resources in 
MemoryCache::pruneDeadResourcesToSize()
https://bugs.webkit.org/show_bug.cgi?id=257968
rdar://110312729

Reviewed by Sihui Liu.

While we were copying the cached resources to a vector before iterating over 
them,
this vector still contained weak pointers, which would therefore become null as
we're iterating. To address the issue, we now null check these weak ptrs in the
loops, before using them.

* Source/WebCore/loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneDeadResourcesToSize):

Canonical link: https://commits.webkit.org/265081@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to