﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
10133	Memory corruption in mythpreviewgen if mpg file contains errors	Lawrence Rust <lvr@…>	danielk	"I have noticed several segfaults and aborts logged by mythbackend when running mythpreviewgen.  It appears that problems occur if the recording contains errors in the transport stream due to reception problems.  I can reliably reproduce the problem with this recording [http://www.softsystem.co.uk/download/mythtv/7941_20111029115050.mpg] (30MB) when invoked as:
mythpreviewgen -v most --infile 7941_20111029115050.mpg

Backtrace attached.

NB there's a bug in mythpreviewgen/main.cpp that needs this patch to specify a filename:
{{{
--- a/mythtv/programs/mythpreviewgen/main.cpp
+++ b/mythtv/programs/mythpreviewgen/main.cpp
@@ -98,7 +98,7 @@ int preview_helper(const QString &_chanid, const QString &star
 
     uint chanid = _chanid.toUInt();
     QDateTime recstartts = myth_dt_from_string(starttime);
-    if (!chanid || !recstartts.isValid())
+    if (!QFileInfo(infile).isReadable() && (!chanid || !recstartts.isValid()))
         ProgramInfo::ExtractKeyFromPathname(infile, chanid, recstartts);
 
     ProgramInfo *pginfo = NULL;
}}}
"	Bug Report - Crash	closed	minor	0.25	MythTV - Mythpreviewgen	0.24.1	medium	Unverified	Memory corruption		0
