Closed Bug 1564797 Opened 1 year ago Closed 1 year ago

Uninitialized pointer field in nsWaylandDisplay::nsWaylandDisplay(wl_display*)

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: andi, Assigned: nbleasdale, Mentored)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

Our Coverity Static Analysis tool implies that member variable mDmabuf is not initialized by the end of constructor nsWaylandDisplay::nsWaylandDisplay(wl_display*) thus the pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.

Member variable declaration.
Constructor definition.

It wouldn't hurt assigning nullptr in that pointer.

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task
Type: task → defect
Priority: -- → P3

mDmabuf is used on Wayland only.

Blocks: wayland
Keywords: checkin-needed
Assignee: nobody → nb.mozd

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/230b2dc832bb
Initialise mDmabuf in nsWaylandDisplay constructor. r=stransky

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.