Closed Bug 1564788 Opened 5 years ago Closed 5 years ago

Dereference after null check in PrintPreviewUserEventSuppressor::HandleEvent(Event*)

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: andi, Assigned: jwatt, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: CID 96529)

Attachments

(1 file)

Our Coverity Static Analysis tool implies that a potential Dereference after null check occurs in PrintPreviewUserEventSuppressor::HandleEvent(Event*) for variable aEvent.

The nullity of the variable is checked here, thus presuming it can be null and it's passed without nullcheck, here, being later on dereferenced.

Maybe it wouldn't hurt that the main condition should also include aEvent.

Whiteboard: CID 96529

@jwatt: Maybe a small conditional adjustment this in the area I think you've been refactoring recently?

Flags: needinfo?(jwatt)
Priority: -- → P3
Flags: needinfo?(jwatt)

Most other overrides of nsIDOMEventListener::HandleEvent don't null check
aEvent at all. This method should never be called without an event.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:jwatt, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)
Flags: needinfo?(jwatt)
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/autoland/rev/dd6e8cc3c3d4
Remove unnecessary null check from PrintPreviewUserEventSuppressor::HandleEvent. r=masayuki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → jwatt
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: