Opened 13 years ago

Closed 13 years ago

#4836 closed defect (invalid)

check for null in AvFormatDecoder::ScanDSMCCStreams()'s

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


Make sure the ic variable pointer is valid before dereferencing in AvFormatDecoder::ScanDSMCCStreams() and ringBuffer in AvFormatDecoder::ScanDSMCCStreams(bool novideo)

Attachments (1)

libs_libmythtv_avformatdecoder.cpp-fix-forgotten-null-check.patch (999 bytes) - added by Erik Hovland <erik@…> 13 years ago.
checks ic and ringBuffer to make sure they are not null

Download all attachments as: .zip

Change History (3)

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

checks ic and ringBuffer to make sure they are not null

comment:1 Changed 13 years ago by Isaac Richards

Milestone: 0.210.22

comment:2 Changed 13 years ago by Nigel

Resolution: invalid
Status: newclosed

Not sure this is needed. OpenFile?() sets ic, or returns -1. If it returns, ScanStreams() isn't called, which means !ScanDSMCCStreams() isn't called.
There are many other places where ic is referenced without being checked first (e.g. !ScanATSCCaptionStreams(), ScanTeletextCaption(), DoFastForward(), SeekReset(), InitByteContext() ) but I think thee are all safe because AVFD doesn't do much if OpenFile?() fails.
If you can find any situations where this isn't the case, please re-open.

Note: See TracTickets for help on using tickets.