[Top][All Lists]

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

Re: Ncurses/Forms: Alignment for dynamic Fields

From: Thomas Dickey
Subject: Re: Ncurses/Forms: Alignment for dynamic Fields
Date: Sat, 19 Jul 2014 21:00:14 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Jul 20, 2014 at 02:38:40AM +0200, Leon Winter wrote:
> 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.

ok (suggestions welcome -naming's painful)
> > (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

hmm - I see that (I must have broken this fairly recently...)

...I would have looked closer, but have been rebuilding a machine most
of today.

> 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

> diff --git a/test/demo_forms.c b/test/demo_forms.c
> index 1e6806d..e84c815 100644
> --- a/test/demo_forms.c
> +++ b/test/demo_forms.c
> @@ -122,7 +122,7 @@ get_data(const char *name)
>           }
>       }
>      }
> -    return result;
> +    return result? result: "";
>  }


Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]