diff options
| author | Klaus Schmidinger <vdr@tvdr.de> | 2011-04-17 13:05:13 +0200 | 
|---|---|---|
| committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-04-17 13:05:13 +0200 | 
| commit | 8e3c9f553fd2b39007dd0066b2f88ac6d953755e (patch) | |
| tree | e8a7acb0bc7ebf3912ad26ac4cd4bf4bc27068f4 | |
| parent | 79f8c5f38e0a24a5f30e0a29fb5c18f03c85c203 (diff) | |
| download | vdr-8e3c9f553fd2b39007dd0066b2f88ac6d953755e.tar.gz vdr-8e3c9f553fd2b39007dd0066b2f88ac6d953755e.tar.bz2 | |
Fixed a possible NULL pointer dereference in osddemo.c
| -rw-r--r-- | CONTRIBUTORS | 1 | ||||
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | PLUGINS/src/osddemo/HISTORY | 4 | ||||
| -rw-r--r-- | PLUGINS/src/osddemo/osddemo.c | 15 | 
4 files changed, 14 insertions, 7 deletions
| diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 08945a3e..c5999624 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2631,6 +2631,7 @@ Paul Menzel <paulepanter@users.sourceforge.net>   for adding LDFLAGS to the linker calls in the Makefiles   for reporting a possible memory leak in the "pictures" plugin   for removing an obsolete local variable in dvbsdffosd.c + for reporting a possible NULL pointer dereference in osddemo.c  Radek Stastny <dedkus@gmail.com>   for translating OSD texts to the Czech language @@ -6599,3 +6599,4 @@ Video Disk Recorder Revision History  - The dvbhddevice plugin is now part of the VDR distribution archive (thanks to    Andreas Regel).  - Removed an obsolete local variable in dvbsdffosd.c (thanks to Paul Menzel). +- Fixed a possible NULL pointer dereference in osddemo.c (reported by Paul Menzel). diff --git a/PLUGINS/src/osddemo/HISTORY b/PLUGINS/src/osddemo/HISTORY index 0d9958ee..ac386b0e 100644 --- a/PLUGINS/src/osddemo/HISTORY +++ b/PLUGINS/src/osddemo/HISTORY @@ -30,3 +30,7 @@ VDR Plugin 'osddemo' Revision History  - Added Cancel(3) to ~cTrueColorDemo() (thanks to Reinhard Nissl).  - Added a missing font deletion in cTrueColorDemo::Action() (thanks to Reinhard Nissl). + +2011-04-17: Version 0.2.2 + +- Fixed a possible NULL pointer dereference in osddemo.c (reported by Paul Menzel). diff --git a/PLUGINS/src/osddemo/osddemo.c b/PLUGINS/src/osddemo/osddemo.c index 43349471..9ad9df7b 100644 --- a/PLUGINS/src/osddemo/osddemo.c +++ b/PLUGINS/src/osddemo/osddemo.c @@ -3,13 +3,13 @@   *   * See the README file for copyright information and how to reach the author.   * - * $Id: osddemo.c 2.4 2011/03/28 16:23:21 kls Exp $ + * $Id: osddemo.c 2.5 2011/04/17 13:05:13 kls Exp $   */  #include <vdr/osd.h>  #include <vdr/plugin.h> -static const char *VERSION        = "0.2.1"; +static const char *VERSION        = "0.2.2";  static const char *DESCRIPTION    = "Demo of arbitrary OSD setup";  static const char *MAINMENUENTRY  = "Osd Demo"; @@ -263,12 +263,13 @@ void cTrueColorDemo::Action(void)               case 3: {                         if (cFont *Font = cFont::CreateFont(DefaultFontOsd, osd->Height() / 10)) {                            NextPixmap = CreateTextPixmap("Millions of colors", Line, 1, clrYellow, clrTransparent, Font); -                          if (NextPixmap) -                             FadeInPixmap = NextPixmap;                            delete Font; -                          Start = cTimeMs::Now(); -                          StartLine = Line; -                          Line += NextPixmap->DrawPort().Height(); +                          if (NextPixmap) { +                             FadeInPixmap = NextPixmap; +                             Start = cTimeMs::Now(); +                             StartLine = Line; +                             Line += NextPixmap->DrawPort().Height(); +                             }                            }                         State++;                       } | 
