Re: cons.saver limit on the maximum number of lines/columns



Hello,

On Fri, 8 Jul 2005, Leonard den Ottolander wrote:

> Hello Pavel,
>
> On Fri, 2005-07-08 at 11:31, Pavel Tsekov wrote:
> >   winsz.ws_col = winsz.ws_row = 0;
> >   if (ioctl (console_fd, TIOCGWINSZ, &winsz) < 0
> >       || winsz.ws_col <= 0 || winsz.ws_row <= 0
> >       || winsz.ws_col >= 256 || winsz.ws_row >= 256)
> >     die ();
> >
> > Do you think that this limitation is really needed ?
>
> It might well have to do with the allocation of a screen buffer or
> something like that. More specifically this might have been a buffer
> overflow fix or avoidance. Slang related yes, so the test might be
> conditional (not sure how ncurses works).

Well, currently the limit has been raised so it should be reflected here
too. I think however that this check might be redundant since MC exits if
it detects that the screen is larger than what SLang allows.

> There are other places in the code where such a limitation is used.
> Sadly the constants SLTT_MAX_SCREEN_COLS and _ROWS are not used
> consistently throughout the code so we'll need to look through the code
> to fix this consistently.

I think those macros were introduced only recently in SLang but I might
be wrong as well. Anyway, do you know of other places which have similiar
checks ?



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