Opened 16 years ago

Closed 15 years ago

#5515 closed defect (fixed)

pointer check before dereference in NuppelVideoPlayer.cpp and tv_play.cpp

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

Description

The latest round of pointer check before dereferencing in libmythtv. These patches are against probably the most heavily used code paths. So their importance are probably low and their chance of screwing things up are high. So feel free to give the patches extra testing before accepting them.

Attachments (2)

libs_libmythtv-forward-null.patch (6.1 KB) - added by Erik Hovland <erik@…> 16 years ago.
checks pointers before dereference of said pointer
libs_libmythtv-forward-null-ticket-5515.patch (8.2 KB) - added by Erik Hovland <erik@…> 16 years ago.
Latest version of the pointer check patch for libmythtv

Download all attachments as: .zip

Change History (4)

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

checks pointers before dereference of said pointer

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

Latest version of the pointer check patch for libmythtv

comment:1 Changed 16 years ago by Erik Hovland <erik@…>

The most interesting part of the new patch is the change in tv_rec.cpp in TuningNewRecorder?. I believe that the way that the V4LChannel object is used is not correct and only the base class member functions are called (which have only stub implementations).

Otherwise it is the same patch as before with a few more checks.

comment:2 Changed 15 years ago by danielk

Resolution: fixed
Status: newclosed

(In [19445]) Fixes #5515. Few more null pointer checks.

Note: I did not apply the GuideGrid?.cpp portion of the patch, those pointers are guarranteed to be valid. Nor did I apply the dynamic_cast<> for the ivtv decoder, also guarranteed. And the V4LChannel changes in tv_rec.cpp are also not needed, C++ inheritance takes care of dispatching those methods correctly for us (you only need to worry about unexpected virtual dispatch in dtors).

Note: See TracTickets for help on using tickets.