Changeset 293922 in webkit


Ignore:
Timestamp:
May 6, 2022, 2:03:27 PM (3 years ago)
Author:
gnavamarino@apple.com
Message:

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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r293921 r293922  
     12022-05-06  Gabriel Nava Marino  <gnavamarino@apple.com>
     2
     3        null ptr deref in WebCore::Frame::setPrinting
     4        https://bugs.webkit.org/show_bug.cgi?id=240173
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Check m_doc in Frame::setPrinting before access, as it is a RefPtr that can become null.
     9
     10        * page/Frame.cpp:
     11        (WebCore::Frame::setPrinting):
     12
    1132022-05-05  Ben Nham  <nham@apple.com>
    214       
  • trunk/Source/WebCore/page/Frame.cpp

    r293326 r293922  
    603603void Frame::setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot shouldAdjustViewSize)
    604604{
    605     if (!view())
     605    if (!view() || !document())
    606606        return;
    607607    // In setting printing, we should not validate resources already cached for the document.
Note: See TracChangeset for help on using the changeset viewer.