[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ncurses/Forms: Alignment for dynamic Fields
From: |
Leon Winter |
Subject: |
Re: Ncurses/Forms: Alignment for dynamic Fields |
Date: |
Sun, 20 Jul 2014 02:38:40 +0200 |
Hi,
> That sounds reasonable: but it makes the behavior different from
> other implementations (looking at Solaris and NetBSD).
> We could add an extension, e.g., a new option value not conflicting
> with other uses.
sure, however in my opinion the current behavior is not desirable I do
see the need for consistency, so a new flag is highly reasonable.
> (by the way, I got a core-dump with your change in test/demo_forms.c -
> but will hold on investigating that pending discussion of a suggested
> extension).
Are you sure that is related to my patch? We were running our Ncurses
patched for over a year without issues now. Also the "demo_forms.c"
application is core dumping without my modification, since there is a
null pointer dereference. If the demo application is not called with
"-t <something>", both t_value (line 115) and my_data (line 116) will
be NULL, which will be passed to init_edit_field and gets passed on to
set_field_buffer. Finally the NULL pointer is given as argument to
strlen which is quite unhappy. Probably you want to change the
semantics in order to avoid this code path, for the time being I
attached a quick fix to avoid a SEGFAULT. However I am not sure this is
the same SEGFAULT you encountered.
Regards,
Leon
demo_forms_segfault_quickfix.diff
Description: Text Data