summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorJasmin Jessich <jasmin@anw.at>2017-06-18 02:13:40 +0200
committerJasmin Jessich <jasmin@anw.at>2017-06-18 02:22:24 +0200
commit914fc339749a5d625bc0aa6367cb1c950df7702b (patch)
tree512268bdc60edf9d72cf6c48db089e4bfd00dbd7 /pages
parent18d3b23cf039ce1d1efb2898d4a8bd812a023f11 (diff)
downloadvdr-plugin-live-914fc339749a5d625bc0aa6367cb1c950df7702b.tar.gz
vdr-plugin-live-914fc339749a5d625bc0aa6367cb1c950df7702b.tar.bz2
Protect stored timers in SortedTimers list
- SortedTimers::GetByTimerId will now return "const cTimer *" to be sure the timer is never modified within live. Modifying or more worse deleting such a timer can lead to a segfault. This is no longer the case, but using const may protect future mistakes.
Diffstat (limited to 'pages')
-rw-r--r--pages/edit_timer.ecpp2
-rw-r--r--pages/timers.ecpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp
index 24bd022..a466ef6 100644
--- a/pages/edit_timer.ecpp
+++ b/pages/edit_timer.ecpp
@@ -48,7 +48,7 @@ string edit_timerreferer;
TimerConflictNotifier timerNotifier;
</%session>
<%request scope="page">
-cTimer* timer;
+const cTimer* timer;
</%request>
<%include>page_init.eh</%include>
<%cpp>
diff --git a/pages/timers.ecpp b/pages/timers.ecpp
index 91986dd..7b7bdc3 100644
--- a/pages/timers.ecpp
+++ b/pages/timers.ecpp
@@ -23,7 +23,7 @@ static const size_t maximumDescriptionLength = 300;
bool logged_in(false);
</%session>
<%request scope="page">
- cTimer* timer;
+ const cTimer* timer;
TimerConflictNotifier timerNotifier;
</%request>
<%include>page_init.eh</%include>