diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-12-18 12:58:31 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-12-18 12:58:31 +0100 |
commit | 7a0af2292ca13b3b79951e3b21a1fdeac7e75c6a (patch) | |
tree | 50f5bd88630ca0c372f17df9194fc6a0571054ac /dvbosd.c | |
parent | df13d22c6c285d7dfa8b8ba98ea58dbe555b4eab (diff) | |
download | vdr-7a0af2292ca13b3b79951e3b21a1fdeac7e75c6a.tar.gz vdr-7a0af2292ca13b3b79951e3b21a1fdeac7e75c6a.tar.bz2 |
Fixed handling OSD areas that have invalid sizes
Diffstat (limited to 'dvbosd.c')
-rw-r--r-- | dvbosd.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbosd.c 1.27 2005/05/22 10:57:45 kls Exp $ + * $Id: dvbosd.c 1.28 2005/12/18 12:56:55 kls Exp $ */ #include "dvbosd.h" @@ -88,6 +88,8 @@ eOsdError cDvbOsd::CanHandleAreas(const tArea *Areas, int NumAreas) return oeBppNotSupported; if ((Areas[i].Width() & (8 / Areas[i].bpp - 1)) != 0) return oeWrongAlignment; + if (Areas[i].Width() < 1 || Areas[i].Height() < 1 || Areas[i].Width() > 720 || Areas[i].Height() > 576) + return oeWrongAreaSize; TotalMemory += Areas[i].Width() * Areas[i].Height() / (8 / Areas[i].bpp); } if (TotalMemory > osdMem) |