Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR 1.3.17 segfaults with DVB subtitles plugin (SOLVED)
I demand that Mikko Matilainen may or may not have written...
> Mikko Matilainen <mikkom@iki.fi> writes:
>> I'm seeing frequent and reproducible segfaults with VDR 1.3.17 when using
>> the DVB subtitles plugin. After a couple of channel changes VDR always
>> segfaults.
> Applying the recent multithreading patches posted in this mailing list
> seems to have solved this problem for me. [...]
I've been looking at this plugin a little recently and have found two places
where it may segfault:
* in cDecoder::modeChanged (called from cDecoder::Reset) when it tries to
dereference i in the last of the three loops (there's a null pointer within
i, yet the object count is 1);
* in SubtitlesViewer::DrawPage, within the SubtitleList::iterator loop, when
bitmap is null (there's another instance of bitmap pointer dereferencing
without checking, but I've not seen a segfault there).
I've patched the latter (both instances) to check for bitmap==NULL, starting
the next iteration if so. I currently don't have any idea whether this has
fixed the former; I'm waiting for core dumps...
(Patch attached and available via apt.)
(Incidentally, libxine CVS has recently gained DVB subtitle support...)
--
| Darren Salt | nr. Ashington, | d youmustbejoking,demon,co,uk
| Debian, | Northumberland | s zap,tartarus,org
| RISC OS | Toon Army | @
| Retrocomputing: a PC card in a Risc PC
When a hammer is the only tool, every problem looks like a nail.
diff -urNad vdr-plugin-subtitles-0.3.6/viewer.c /tmp/dpep.txbUfw/vdr-plugin-subtitles-0.3.6/viewer.c
--- vdr-plugin-subtitles-0.3.6/viewer.c 2004-11-23 18:59:01.000000000 +0000
+++ vdr-plugin-subtitles-0.3.6/viewer.c 2004-12-07 14:38:42.000000000 +0000
@@ -130,6 +130,9 @@
cSubtitle* subtitle = *i;
cBitmap* bitmap = subtitle->GetBitmap();
+ if (bitmap == NULL)
+ continue; // zero-sized area?
+
int x = subtitle->X();
int y = subtitle->Y();
int w = bitmap->Width();
@@ -163,6 +166,8 @@
{
cSubtitle* subtitle = *i;
cBitmap* bitmap = subtitle->GetBitmap();
+ if (bitmap == NULL)
+ continue; // zero-sized area?
int x = subtitle->X();
int y = subtitle->Y();
Home |
Main Index |
Thread Index