Bug 37751 - Infinite recursion in WebCore::SVGPatternElement::buildPattern leads to stack exhaustion
Summary: Infinite recursion in WebCore::SVGPatternElement::buildPattern leads to stack...
Status: RESOLVED DUPLICATE of bug 32171
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2010-04-17 02:32 PDT by Tobias Klein
Modified: 2010-04-19 03:26 PDT (History)
1 user (show)

See Also:

Testcase (346 bytes, application/xhtml+xml)
2010-04-17 02:33 PDT, Tobias Klein
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klein 2010-04-17 02:32:48 PDT
Opening the attached SVG file causes infinite recursion in WebCore::SVGPatternElement::buildPattern, which leads to stack exhaustion.

Code snippet:


void SVGPatternElement::buildPattern(const FloatRect& targetRect) const
    // Render subtree into ImageBuffer
    for (Node* n = attributes.patternContentElement()->firstChild(); n; n = n->nextSibling()) {
        if (!n->isSVGElement() || !static_cast<SVGElement*>(n)->isStyled() || !n->renderer())
        renderSubtreeToImage(patternImage.get(), n->renderer());
Comment 1 Tobias Klein 2010-04-17 02:33:59 PDT
Created attachment 53595 [details]
Comment 2 Dirk Schulze 2010-04-19 03:26:23 PDT
Thanks for the test case.

*** This bug has been marked as a duplicate of bug 32171 ***