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:[EMAIL PROTECTED]
--- ../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@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to