[PATCH] osd GetBitmap() causes infinite loop

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

 



Hi there

The softdevice plugin was getting stuck in an infinite loop because of
a bogus return from the GetBitmap() function in osd.c.
This function should always return NULL when the 'Area' argument is
greater than or equal to 'numBitmaps'.

Regards -- Gerard


= = = = = = = = = = = = = =
diff -pruN a/osd.c b/osd.c
--- a/osd.c    2012-06-09 07:37:24.000000000 -0700
+++ b/osd.c    2012-12-14 17:36:27.000000000 -0800
@@ -1683,9 +1683,9 @@ void cOsd::SetAntiAliasGranularity(uint

 cBitmap *cOsd::GetBitmap(int Area)
 {
-  if (isTrueColor)
-     Area = 0; // returns the dummy bitmap
-  return Area < numBitmaps ? bitmaps[Area] : NULL;
+  /* TrueColor gets the dummy bitmap */
+  return Area < numBitmaps ? (isTrueColor ? bitmaps[0] : bitmaps[Area]) \
+            : NULL;
 }

 cPixmap *cOsd::CreatePixmap(int Layer, const cRect &ViewPort, const cRect &DrawPort)
= = = = = = = = = = = = = =


_______________________________________________
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