bug-ncurses
[Top][All Lists]
Advanced

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

Re: Small change to _nc_write_entry


From: Thomas Dickey
Subject: Re: Small change to _nc_write_entry
Date: Sun, 11 Feb 2018 15:23:57 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Feb 11, 2018 at 09:28:25AM +0100, Sven Joachim wrote:
> In the 20171125 patchlevel, a limit2 variable was introduced in the
> _nc_write_entry function.  Julien Cristau has pointed out[1] that there
> is a place where it probably should be used, but is not.

thanks (an improvement)

> diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c
> index cc3f83ac..c8027156 100644
> --- a/ncurses/tinfo/write_entry.c
> +++ b/ncurses/tinfo/write_entry.c
> @@ -377,7 +377,7 @@ _nc_write_entry(TERMTYPE2 *const tp)
>       start_time = 0;
>      }
>  
> -    if (strlen(first_name) >= sizeof(filename) - (2 + LEAF_LEN)) {
> +    if (strlen(first_name) >= limit2) {
>       _nc_warning("terminal name too long.");
>       saved = first_name[limit2];
>       first_name[limit2] = '\0';

> 
> Cheers,
>        Sven
> 
> 
> 1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885582#15

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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