Opened 13 years ago

Closed 13 years ago

#4737 closed defect (fixed)

typo in card id check and proper dereference in null pointer check

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


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.

Attachments (1)

fix-typo-and-dereference-in-libmythtv.patch (1008 bytes) - added by Erik Hovland <erik@…> 13 years ago.
fixes typo in one 'if' and a wrong dereference in another 'if'

Download all attachments as: .zip

Change History (2)

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

fixes typo in one 'if' and a wrong dereference in another 'if'

comment:1 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [16197]) Fixes #4737. Fixes a null pointer check so it actually works, and fixes a typo that lead to an always true null pointer check instead of a null value check. Patch from Erik Hovland.

Note: See TracTickets for help on using tickets.