From 3f38f1d61b4a4b6b7b0cc21dc68b42c1b13a7a23 Mon Sep 17 00:00:00 2001 From: Martin Gansser Date: Apr 12 2019 09:15:50 +0000 Subject: Add Fix_possible_format_overflow_and_avoid_compiler_warning.patch --- diff --git a/Fix_possible_format_overflow_and_avoid_compiler_warning.patch b/Fix_possible_format_overflow_and_avoid_compiler_warning.patch new file mode 100644 index 0000000..95ba789 --- /dev/null +++ b/Fix_possible_format_overflow_and_avoid_compiler_warning.patch @@ -0,0 +1,34 @@ +From 770de32f1908b1f9c60f66bf288a4c8a03f97d52 Mon Sep 17 00:00:00 2001 +From: Johann Friedrichs +Date: Thu, 11 Apr 2019 14:13:08 +0200 +Subject: Fix possible format overflow and avoid compiler warning + + +diff --git a/menu_conflictcheck.c b/menu_conflictcheck.c +index 3e03cfe..01340f8 100644 +--- a/menu_conflictcheck.c ++++ b/menu_conflictcheck.c +@@ -164,10 +164,10 @@ bool cMenuConflictCheckDetailsItem::Update(bool Force) + hasTimer = timerObj->OrigTimer(Timers) ? timerObj->OrigTimer(Timers)->HasFlags(tfActive) : false; + if (Force || hasTimer != oldhasTimer) { + const cTimer* timer = timerObj->timer; +- char device[2] = ""; ++ char device[3] = ""; // compiler warns if MAXDEVICES too big + if (hasTimer) { + if (!timerObj->conflCheckTime && timerObj->device > -1) +- sprintf(device, "%d", timerObj->device + 1); ++ sprintf(device, "%d", (timerObj->device + 1)&MAXDEVICES); + else { + if (timer->Local()) + strcpy(device, tr("C")); +@@ -176,7 +176,6 @@ bool cMenuConflictCheckDetailsItem::Update(bool Force) + } + } + +-// cString buffer = cString::sprintf("%s\t%s\t%d\t%s - %s\t%d\t%s\t%s", hasTimer?">":"", timer->Remote()?timer->Remote():"", timer->Channel()->Number(), TIMESTRING(timerObj->start), TIMESTRING(timerObj->stop), timer->Priority(), device, timer->File()); + cString buffer = cString::sprintf("%s\t%d\t%s - %s\t%d\t%s\t%s", hasTimer ? ">" : "", timer->Channel()->Number(), TIMESTRING(timerObj->start), TIMESTRING(timerObj->stop), timer->Priority(), device, timer->File()); + + SetText(buffer); +-- +cgit v0.10.2 + diff --git a/vdr-epgsearch.spec b/vdr-epgsearch.spec index 268f058..1fb2ed2 100644 --- a/vdr-epgsearch.spec +++ b/vdr-epgsearch.spec @@ -3,7 +3,7 @@ Name: vdr-%{pname} Version: 2.4.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Powerful schedules menu replacement plugin for VDR License: GPLv2+ @@ -18,6 +18,8 @@ Source5: %{name}-epgsearchmenu.conf Patch0: %{name}-2.4.0-fedora.patch # Patche from upstream Patch1: replace_auto_ptr_with_unique_ptr.patch +Patch2: Fix_possible_format_overflow_and_avoid_compiler_warning.patch + BuildRequires: gcc-c++ BuildRequires: vdr-devel >= 1.7.36 @@ -34,6 +36,7 @@ reusable queries which can be used as dynamic "search timers" etc. %setup -q -n vdr-plugin-%{pname}-%{version} vdr-plugin-epgsearch-2.4.0 sed -e 's|__VARDIR__|%{vdr_vardir}|g' %{PATCH0} | %{__patch} -p1 --fuzz=0 %patch1 -p1 +%patch2 -p1 for f in scripts/epgsearchcmds-french.conf conf/epgsearchcats.conf-tvm2vdr* ; do iconv -f iso-8859-1 -t utf-8 -o $f.utf8 $f ; mv $f.utf8 $f @@ -43,7 +46,7 @@ chmod -x scripts/* %build -make %{?_smp_mflags} AUTOCONFIG=0 +%make_build AUTOCONFIG=0 %install @@ -83,6 +86,9 @@ install -dm 755 $RPM_BUILD_ROOT%{vdr_vardir}/epgsearch %changelog +* Fri Apr 12 2019 Martin Gansser - 2.4.0-6 +- Add Fix_possible_format_overflow_and_avoid_compiler_warning.patch + * Wed Apr 10 2019 Martin Gansser - 2.4.0-5 - Add replace_auto_ptr_with_unique_ptr.patch