Sanity check in cMenuEditIntItem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux