cons.handler.c for FreeBSD
Andrew V. Samoilov
sav at bcs.zp.ua
Wed Mar 5 19:21:41 UTC 2003
Max Khon wrote:
> hi, there!
>
> On Wed, Mar 05, 2003 at 10:34:21PM +0600, Max Khon wrote:
>
>
>>>and it is still not obvious to me how I can test "output lines"
>>>with Ctrl-O.
>>
>>another question is about non-standard console modes.
>>I (and other users) are getting core dumps when console video mode
>>is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere
>>inside ncurses. The backtrace is:
>
>
> [...]
>
>
>>can you take a look at this bug?
>
>
> I have fixed the bug. Diff against trunk is attached
> Index: cons.handler.c
> ===================================================================
> RCS file: /cvs/gnome/mc/src/cons.handler.c,v
> retrieving revision 1.17
> diff -u -p -r1.17 cons.handler.c
> --- cons.handler.c 5 Mar 2003 09:29:31 -0000 1.17
> +++ cons.handler.c 5 Mar 2003 17:13:17 -0000
> @@ -403,7 +403,7 @@ console_init (void)
> screen_shot.xsize = screen_info.mv_csz;
> screen_shot.ysize = screen_info.mv_rsz;
> if ((screen_shot.buf =
> - g_malloc (screen_info.mv_csz * screen_info.mv_rsz)) == NULL)
> + g_malloc (screen_info.mv_csz * screen_info.mv_rsz * 2)) == NULL)
> return;
>
> console_flag = 1;
Well, I think this fix is not enough. It shall be SIGWINCH catched and
screen_shot.buf reallocated dynamically or vidcontrol 132x60 will crash
mc again.
--
Regards,
Andrew V. Samoilov
More information about the mc-devel
mailing list