Bug 166655

Summary: Avoid null dereference when search input is not part of a document
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebCore Misc.Assignee: Brent Fulgham <bfulgham>
Status: NEW    
Severity: Normal CC: ap, bfulgham
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Brent Fulgham
Reported 2017-01-03 11:24:26 PST
Crash traces indicate that the SearchInputType object can get into a state where the results or cancel buttons are not part of a Document. When this happens, the computedStyle() accessor returns nullptr, which can cause a crash. This patch protects against accidentally dereferencing the nullptr returned in this case.
Attachments
Alexey Proskuryakov
Comment 1 2017-01-03 16:09:13 PST
Is it OK for the objects to be in this state? In other words, will the null check convert a crash into a misbehavior, or is it a complete fix?
Note You need to log in before you can comment on or make changes to this bug.