Ticket #5081: libs_libmythtv_avformatdecoder.cpp-check-for-null-in-ScanDSMCCStreams.patch

File libs_libmythtv_avformatdecoder.cpp-check-for-null-in-ScanDSMCCStreams.patch, 747 bytes (added by Erik Hovland <erik@…>, 16 years ago)

check ic before dereferencing it

  • libs/libmythtv/avformatdecoder.cpp

    It is highly unlikely. But AvFormatDecoder::ScanDSMCCStreams could be called and the member
    
    From: Erik Hovland <erik@hovland.org>
    
    var ic could be null. It should be checked.
    ---
    
     libs/libmythtv/avformatdecoder.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmythtv/avformatdecoder.cpp b/libs/libmythtv/avformatdecoder.cpp
    index 4460211..3247e55 100644
    a b void AvFormatDecoder::ScanTeletextCaptions(int av_index) 
    13751375 */
    13761376void AvFormatDecoder::ScanDSMCCStreams(void)
    13771377{
    1378     if (!ic->cur_pmt_sect)
     1378    if (!ic || !ic->cur_pmt_sect)
    13791379        return;
    13801380
    13811381    if (!itv && ! (itv = GetNVP()->GetInteractiveTV()))