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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
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?