[mythtv-commits] Ticket #4737: typo in card id check and proper dereference in null pointer check

MythTV mythtv at cvs.mythtv.org
Fri Feb 22 03:46:12 UTC 2008


#4737: typo in card id check and proper dereference in null pointer check
---------------------------------------------+------------------------------
 Reporter:  Erik Hovland <erik at hovland.org>  |       Owner:  ijr 
     Type:  defect                           |      Status:  new 
 Priority:  minor                            |   Milestone:  0.21
Component:  mythtv                           |     Version:  head
 Severity:  low                              |     Mlocked:  0   
---------------------------------------------+------------------------------
 In libmythtv in the member function CardInput::sourceFetch() in the file
 videosource.cpp there is a check of the pointer cardid at line 2258. But
 the pointer cardid has already been dereferenced, therefore the check
 doesn't really mean anything. Instead what the function is likely to need
 to do is check if the crdid is 0 (invalid) or not.

 In libmythtv in the function sub_readtext in the file xine_demux_sputext.c
 there is a check of the double pointer dest. This is directly after a call
 to malloc for the pointer *dest. It is likely that the caller wanted to
 check the validity of the *dest and not dest. Since that is the pointer
 that might be null.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4737>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list