Bug 22160 - Nil deref because nextLinePosition (previousLinePosition, too) uses a nil node
Summary: Nil deref because nextLinePosition (previousLinePosition, too) uses a nil node
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-11-10 10:59 PST by Darin Adler
Modified: 2008-11-29 11:30 PST (History)
0 users

See Also:


Attachments
patch (2.78 KB, patch)
2008-11-10 11:03 PST, Darin Adler
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2008-11-10 10:59:12 PST
Chris Fleizach noticed this crash while in a mail message. looks like a node needs to be checked for nil somewhere

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010113bf1a in WebCore::Node::hasTagName (this=0x0, name=@0x10224b698) at Node.h:95
95	    bool hasTagName(const QualifiedName& name) const { return virtualHasTagName(name); }
(gdb) bt
#0  0x000000010113bf1a in WebCore::Node::hasTagName (this=0x0, name=@0x10224b698) at Node.h:95
#1  0x00000001017d87ec in WebCore::canHaveChildrenForEditing (node=0x0) at /Volumes/data/WebKit/WebCore/editing/htmlediting.cpp:78
#2  0x00000001017d895b in WebCore::editingIgnoresContent (node=0x0) at /Volumes/data/WebKit/WebCore/editing/htmlediting.cpp:62
#3  0x00000001017fcfa0 in WebCore::nextLinePosition (visiblePosition=@0x7fff5fbfe4a0, x=95) at /Volumes/data/WebKit/WebCore/editing/visible_units.cpp:605
#4  0x0000000101755d62 in WebCore::SelectionController::modifyMovingForward (this=0x7fff5fbfe580, granularity=WebCore::LineGranularity) at /Volumes/data/WebKit/WebCore/editing/SelectionController.cpp:335

etc.
Comment 1 Darin Adler 2008-11-10 11:03:22 PST
Created attachment 25022 [details]
patch
Comment 2 mitz 2008-11-10 11:06:51 PST
Comment on attachment 25022 [details]
patch

r=me
Comment 3 Darin Adler 2008-11-11 10:00:20 PST
http://trac.webkit.org/changeset/38304
Comment 4 David Kilzer (:ddkilzer) 2008-11-29 11:28:01 PST
See also Bug 20482.

Comment 5 David Kilzer (:ddkilzer) 2008-11-29 11:30:40 PST
<rdar://problem/5995450>