[webkit-changes] [WebKit/WebKit] b40982: REGRESSION (macOS 15.2): Null deref under UnifiedP...

Abrar Rahman Protyasha noreply at github.com
Tue Jan 14 11:31:07 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b4098207bba0645d852e25a489561ab8ecabbaf3
      https://github.com/WebKit/WebKit/commit/b4098207bba0645d852e25a489561ab8ecabbaf3
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  REGRESSION (macOS 15.2): Null deref under UnifiedPDFPlugin::updateScrollingExtents
https://bugs.webkit.org/show_bug.cgi?id=285905
rdar://138880307

Reviewed by Tim Horton.

There are a couple of places in the plugin where we unconditionally
unwrap m_element->renderer(), when there is no guarantee about the
renderer's state (since we did not ensure layout is up to date), which
leads to null dereference crashes.

This patch addresses said crashes by checking the value of
m_element->renderer() before actually dereferencing the renderer object
and using it for the plugin's purposes.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::paintPDFSelection):
(WebKit::UnifiedPDFPlugin::updateScrollingExtents):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list