Title: [293922] trunk/Source/WebCore
- Revision
- 293922
- Author
- [email protected]
- Date
- 2022-05-06 14:03:27 -0700 (Fri, 06 May 2022)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (293921 => 293922)
--- trunk/Source/WebCore/ChangeLog 2022-05-06 20:26:03 UTC (rev 293921)
+++ trunk/Source/WebCore/ChangeLog 2022-05-06 21:03:27 UTC (rev 293922)
@@ -1,3 +1,15 @@
+2022-05-06 Gabriel Nava Marino <[email protected]>
+
+ 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 <[email protected]>
Add support for Notification objects with custom data
Modified: trunk/Source/WebCore/page/Frame.cpp (293921 => 293922)
--- trunk/Source/WebCore/page/Frame.cpp 2022-05-06 20:26:03 UTC (rev 293921)
+++ trunk/Source/WebCore/page/Frame.cpp 2022-05-06 21:03:27 UTC (rev 293922)
@@ -602,7 +602,7 @@
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes