Sanity check in cMenuEditIntItem

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

 



Roland Praml wrote:
> 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

I had already done this for version 1.3.45, so please don't be
surprised if you don't find an entry in CONTRIBUTORS for this ;-)

Klaus


[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