From 50211c706a120cf1d7b60898c5e43b15dff6455b Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 17 May 2017 09:17:44 +0200 Subject: [PATCH] Fixed a crash in case the bottom text of a CAM menu is empty --- HISTORY | 3 ++- menu.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index c1477b38..44288cd3 100644 --- a/HISTORY +++ b/HISTORY @@ -8991,7 +8991,7 @@ Video Disk Recorder Revision History current channel is listed. - Fixed a possible crash when pulling the CAM while decrypting a channel with MTD. -2017-05-12: Version 2.3.5 +2017-05-17: Version 2.3.5 - CAMs are now sent a generated EIT packet that contains a single 'present event' for the current SID, in order to avoid any parental rating dialogs. @@ -9024,3 +9024,4 @@ Video Disk Recorder Revision History - Fixed handling line numbers in error messages when reading EPG data. - Added handling RI_HOST_CONTROL to the CI protocol (no actual processing, but its presence is required by some CAMs). +- Fixed a crash in case the bottom text of a CAM menu is empty. diff --git a/menu.c b/menu.c index ac3c086c..43ff7280 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.26 2017/05/01 13:01:00 kls Exp $ + * $Id: menu.c 4.27 2017/05/17 09:15:51 kls Exp $ */ #include "menu.h" @@ -2243,7 +2243,7 @@ void cMenuCam::Set(void) SetHasHotkeys(ciMenu->Selectable()); GenerateTitle(ciMenu->TitleText()); dsyslog("CAM %d: '%s'", camSlot->SlotNumber(), ciMenu->TitleText()); - if (*ciMenu->SubTitleText()) { + if (!isempty(ciMenu->SubTitleText())) { dsyslog("CAM %d: '%s'", camSlot->SlotNumber(), ciMenu->SubTitleText()); AddMultiLineItem(ciMenu->SubTitleText()); offset = Count(); @@ -2252,7 +2252,7 @@ void cMenuCam::Set(void) Add(new cOsdItem(hk(ciMenu->Entry(i)), osUnknown, ciMenu->Selectable())); dsyslog("CAM %d: '%s'", camSlot->SlotNumber(), ciMenu->Entry(i)); } - if (*ciMenu->BottomText()) { + if (!isempty(ciMenu->BottomText())) { AddMultiLineItem(ciMenu->BottomText()); dsyslog("CAM %d: '%s'", camSlot->SlotNumber(), ciMenu->BottomText()); }