Opened 12 years ago

Closed 12 years ago

#4745 closed defect (fixed)

always check that the context pointer is valid in MythContext::GetSetting

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

MythContext::GetSetting?() in libs/libmyth/mythcontext.cpp should always check that its context pointer is not null before dereferencing it. It does this in every instance but one.

Attachments (1)

libs_libmyth_mythcontext.cpp-fix-forgotten-null-check.patch (718 bytes) - added by Erik Hovland <erik@…> 12 years ago.
adds a check for non-null before dereferencing the context pointer

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by Erik Hovland <erik@…>

adds a check for non-null before dereferencing the context pointer

comment:1 Changed 12 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [16206]) MythContextPrivate? can't ever be null. assert in the constructor, and remove useless checks for it.

Indirectly fixes #4745.

Note: See TracTickets for help on using tickets.