[Webkit-unassigned] [Bug 53008] New: chrome.dll!WebCore::ApplyStyleCommand::applyInlineStyle ReadAV at NULL (087acf9f68b5cba71094dae9370bdc92)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 24 07:12:26 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53008

           Summary: chrome.dll!WebCore::ApplyStyleCommand::applyInlineStyl
                    e ReadAV at NULL (087acf9f68b5cba71094dae9370bdc92)
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P1
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: skylined at chromium.org
                CC: rniwa at webkit.org


Created an attachment (id=79921)
 --> (https://bugs.webkit.org/attachment.cgi?id=79921&action=review)
Repro

Chromium: http://code.google.com/p/chromium/issues/detail?id=70605

Repro:
<body onload="
  document.execCommand('SelectAll');
  document.designMode='on';
  document.execCommand('underline');
  document.execCommand('Bold');
"><svg><text>x

This code hits ApplyStyleCommand::applyInlineStyle twice. The second time it does so, splitEnd is true in:
    bool splitEnd = isValidCaretPositionInTextNode(end);
    if (splitEnd) {
        if (shouldSplitTextElement(end.node()->parentElement(), style))
            splitTextElementAtEnd(start, end);
        else
            splitTextAtEnd(start, end);
        start = startPosition();
        end = endPosition();
        endDummySpanAncestor = dummySpanAncestorForNode(end.node());
    }
After this code runs, start.isNull() is true. This causes a NULL pointer in an inline function later on.

Adding the below check after the above code fixes this issue:
    if (start.isNull())
        return;
However, I don't understand the code well enough to determine if this is a proper fix for this issue, or if the problems is more fundamental.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list