Skip to content
Permalink
Browse files
null ptr deref in WebCore::Frame::setPrinting
https://bugs.webkit.org/show_bug.cgi?id=240173

Reviewed by Wenson Hsieh.

Check m_doc in Frame::setPrinting before access, as it is a RefPtr that can become null.

* page/Frame.cpp:
(WebCore::Frame::setPrinting):

Canonical link: https://commits.webkit.org/250369@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Gabriel Nava Marino committed May 6, 2022
1 parent f10a012 commit 62924d6df2299088dd46b2914980daafd9b9b86f
Showing 2 changed files with 13 additions and 1 deletion.
@@ -1,3 +1,15 @@
2022-05-06 Gabriel Nava Marino <gnavamarino@apple.com>

null ptr deref in WebCore::Frame::setPrinting
https://bugs.webkit.org/show_bug.cgi?id=240173

Reviewed by Wenson Hsieh.

Check m_doc in Frame::setPrinting before access, as it is a RefPtr that can become null.

* page/Frame.cpp:
(WebCore::Frame::setPrinting):

2022-05-05 Ben Nham <nham@apple.com>

Add support for Notification objects with custom data
@@ -602,7 +602,7 @@ bool Frame::requestDOMPasteAccess(DOMPasteAccessCategory pasteAccessCategory)

void Frame::setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot shouldAdjustViewSize)
{
if (!view())
if (!view() || !document())
return;
// In setting printing, we should not validate resources already cached for the document.
// See https://bugs.webkit.org/show_bug.cgi?id=43704

0 comments on commit 62924d6

Please sign in to comment.