Opened 13 years ago
Closed 13 years ago
#4836 closed defect (invalid)
check for null in AvFormatDecoder::ScanDSMCCStreams()'s
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | 0.21-fixes |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
Make sure the ic variable pointer is valid before dereferencing in AvFormatDecoder::ScanDSMCCStreams() and ringBuffer in AvFormatDecoder::ScanDSMCCStreams(bool novideo)
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | libs_libmythtv_avformatdecoder.cpp-fix-forgotten-null-check.patch added |
---|
comment:1 Changed 13 years ago by
Milestone: | 0.21 → 0.22 |
---|
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
checks ic and ringBuffer to make sure they are not null