diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-10-02 08:49:36 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-10-02 08:49:36 +0200 |
commit | ba24e93d82e0083b95a27369daf61e511d3dafd5 (patch) | |
tree | a8878a83d28be52c3b404e80233003d0dc23da0d /osd.c | |
parent | 4b8ff6190172b812f68b7ec21d348f87dfb0a81a (diff) | |
download | vdr-ba24e93d82e0083b95a27369daf61e511d3dafd5.tar.gz vdr-ba24e93d82e0083b95a27369daf61e511d3dafd5.tar.bz2 |
Added a check against MAXOSDAREAS in cOsd::CanHandleAreas()
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.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: osd.c 1.62 2005/06/19 10:43:04 kls Exp $ + * $Id: osd.c 1.63 2005/10/02 08:47:13 kls Exp $ */ #include "osd.h" @@ -618,6 +618,8 @@ cBitmap *cOsd::GetBitmap(int Area) eOsdError cOsd::CanHandleAreas(const tArea *Areas, int NumAreas) { + if (NumAreas > MAXOSDAREAS) + return oeTooManyAreas; eOsdError Result = oeOk; for (int i = 0; i < NumAreas; i++) { if (Areas[i].x1 > Areas[i].x2 || Areas[i].y1 > Areas[i].y2 || Areas[i].x1 < 0 || Areas[i].y1 < 0) |