Re: [ANNOUNCE] DVB-S2 + H.264 support for VDR-1.5.12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Reinhard Nissl schrieb:

>> The patches now include my recently released speedup patches as
>> well as an unreleased speedup patch for cAudioRepacker and
>> cVideoRepacker, because at least the latter one would have been
>> hard to extract separately.
> 
> cAudioRepacker speedup patch contains a typo. Please apply the
> attached fix.

The optimized DrawRectangle() will crash when called with
incorrect coordinates, i. e. x1 > x2 or y1 > y2.

More generally such issues should be handled in Intersects() and
Covers(). The attached patch adds sanity checks to them.

Thanks to Claus Meder for reporting this issue.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl@xxxxxx
--- ../vdr-1.5.12-dvbs2-other/osd.c	2008-01-01 22:55:18.000000000 +0100
+++ osd.c	2008-01-06 22:39:33.000000000 +0100
@@ -217,6 +217,8 @@ bool cBitmap::Contains(int x, int y) con
 
 bool cBitmap::Covers(int x1, int y1, int x2, int y2) const
 {
+  if (x1 > x2 || y1 > y2) // sanity check
+     return false;
   x1 -= x0;
   y1 -= y0;
   x2 -= x0;
@@ -226,6 +228,8 @@ bool cBitmap::Covers(int x1, int y1, int
 
 bool cBitmap::Intersects(int x1, int y1, int x2, int y2) const
 {
+  if (x1 > x2 || y1 > y2) // sanity check
+     return false;
   x1 -= x0;
   y1 -= y0;
   x2 -= x0;
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux