[mythtv] Patch to avoid crash in 'ShortVirtualChannelTable' parsing

Klaas de Waal klaas.de.waal at gmail.com
Tue Jan 21 20:48:35 UTC 2020


On Tue, 21 Jan 2020 at 14:19, Douglas Paul <doug at bogon.ca> wrote:

> Hi Klaas,
>
> On Mon, Jan 20, 2020 at 08:50:02PM +0100, Klaas de Waal wrote:
> > Thanks for your patch. I appreciate that you create the fix and take the
> > trouble to send it. I will look at it.
> > However, it would be very convenient if I can reproduce the problem and
> > test possible fixes myself and I can do that if you would sent me a
> capture
> > of the complete transport stream that contains the problematic channel.
> > This can easily be made with the "MPTS channel" option that is now in
> > MythTV, or with any other appliance, e.g. dvbsnoop, that can be used to
> > make a recording of the full transport stream. Bigger is better, if
> > possible then e.g. 2GB (the maximum that can be sent  for free with
> > WeTransfer) or e.g. 4GB (which can be sent as an email attachment to my
> > gmail address) would be perfect.
>
> I will look into this. Hopefully their configuration is still broken.
>
> In the case they have fixed things, would it be of any use if I capture
> a TS and modify it to exercise the failure I saw? Basically, the crash
> occurred when the 'descriptors_included' bit was set, the
> 'number_of_vc_records' was large, and the length fields read from the
> invalid MPEG descriptors was also very large.
>
> Also, is there a simple way to feed Myth a TS that will be processed in
> through the same flow as a recording so I could make sure that it
> crashes?
>
> Also when the currently transmitted TS is fixed then a captured TS is
useful because it can then be used to verify that the patch, when
installed, does not break anything. It is not useful to modify the captured
TS manually to make things crash as this does not prove anything. I did
have a look at the code ad it is easy to see how it goes wrong if the
received data does not contain valid descriptors.

I do test a lot with the mythtv-setup channel scanner and as far as I know
it parses all descriptors in the stream, so that should also crash on your
broken stream.
In mythtv-setup I can do a channel scan from a recorded transport stream by
using a software-only capture card device "External (black box) recorder" ;
this device can be configured to use the bundled utility mythfilerecorder
(see https://www.mythtv.org/wiki/ExternalRecorder#mythfilerecorder) to play
an arbitrary transport stream.
According to https://www.mythtv.org/wiki/Import_recorder the software-only
capture card device "Import test recorder" can be used to make recordings
from a played-back transport stream but I have not yet tried this, mainly
because it is not yet possible to do channel scanning from the "Import test
recorder". But this might be a good occasion to try this.

So yes, your transport stream can possibly reproduce the problem and it can
be used to verify that the patch, when installed, does not cause a
regression. And it enables me to do regression tests with future fixes and
enhancements in MythTV.

Thanks,
Klaas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200121/38cf7ad9/attachment.htm>


More information about the mythtv-dev mailing list