[vdr] Sanity check in cMenuEditIntItem

Roland Praml pram2000 at web.de
Tue Mar 14 20:06:32 CET 2006


Hi Klaus,

because of a wrong config file my vdr crashes when I select certain Setup
entries in the menu.
If there are int-values out of range in the setup entry, cMenuEditIntItem
does crash.

Here is a workaround (maybe there is a better place for the code).
----
cMenuEditIntItem::cMenuEditIntItem(const char *Name, int *Value, int Min,
int Max)
:cMenuEditItem(Name)
{
  value = Value;
  min = Min;
  max = Max;
+  if (*value > max) *value=max;
+  if (*value < min) *value=min;
  Set();
}
----

Roland





More information about the vdr mailing list