Closed Bug 252448 Opened 21 years ago Closed 21 years ago

Useless use of unchecked pointer can crash

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

()

Details

(Keywords: crash, testcase)

Attachments

(2 files)

nsMenuFrame::GetScrollableView doesn't null-check the return from popup->GetScrollableView(childFrame) so it will crash calling (*aView)->SetLineHeight if the return is null. This code only appears to be used by the mousewheel code. I tried compiling Mozilla without the call to SetLineHeight and it appears to have no effect on mousewheeling menus or menulists in either Classic or Modern theme.
Assignee: nobody → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Comment on attachment 153895 [details] [diff] [review] Remove useless line Although this line was added as part of the similar sounding bug 57598 that actually refers to HTML selects, and does not seem to be relevant here.
Attachment #153895 - Flags: superreview?(roc)
Attachment #153895 - Flags: review?(bryner)
Attachment #153895 - Flags: superreview?(roc)
Attachment #153895 - Flags: superreview+
Attachment #153895 - Flags: review?(bryner)
Attachment #153895 - Flags: review+
Attached file Reduced test case
Instructions for test case: 1. Load test case 2. Scroll mouse wheel 3. Invoke deity of choice
Keywords: testcase
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.widgets
content/xul/content/crashtests/252448-1.xul http://hg.mozilla.org/mozilla-central/rev/b0337b6287f3
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: