[webkit-changes] [WebKit/WebKit] 80914b: Limit recursion depth for ContainerNode::cloneChil...

Zak Ridouh noreply at github.com
Wed Feb 19 19:00:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80914b1cad4092f109f366cde070d9acbd4a1a1f
      https://github.com/WebKit/WebKit/commit/80914b1cad4092f109f366cde070d9acbd4a1a1f
  Author: Zak Ridouh <zakr at apple.com>
  Date:   2025-02-19 (Wed, 19 Feb 2025)

  Changed paths:
    A LayoutTests/fast/dom/Node/cloneChild-recursion-limit-expected.txt
    A LayoutTests/fast/dom/Node/cloneChild-recursion-limit.html
    M Source/WebCore/dom/ContainerNode.cpp
    M Source/WebCore/dom/ContainerNode.h

  Log Message:
  -----------
  Limit recursion depth for ContainerNode::cloneChildNodes
https://bugs.webkit.org/show_bug.cgi?id=277031
rdar://132430642

Reviewed by Ryosuke Niwa.

Add a stack recursion limit to `ContainerNode::cloneChildNodes`,
currently set at 1024, at which point we start rejecting any deeper
clones.

Add a test in /fast/ to validate this new limit.

* LayoutTests/fast/dom/Node/cloneChild-recursion-limit-expected.txt: Added.
* LayoutTests/fast/dom/Node/cloneChild-recursion-limit.html: Added.
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes):
* Source/WebCore/dom/ContainerNode.h:

Canonical link: https://commits.webkit.org/290680@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