bug-ncurses
[Top][All Lists]
Advanced

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

Re: [bug-ncurses] ncurses-5.9-20120303.patch.gz


From: Thomas Dickey
Subject: Re: [bug-ncurses] ncurses-5.9-20120303.patch.gz
Date: Mon, 05 Mar 2012 16:53:18 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Mar 05, 2012 at 01:02:44PM +0100, Dr. Werner Fink wrote:
> On Sat, Mar 03, 2012 at 07:10:11PM -0500, Thomas Dickey wrote:
> >  
> > 20120303
...
> 
> Thanks a lot!  Just to help ncurses 5.9.20120303 and tack 1.07.20120303
> to build I've one patch more to make the fortify system of the glibc
> happy again.  You may consider der attached patch.

thanks - will review/check - just by reading the diff I can't tell, but the
format can add 5 bytes counting the trailing null...

> --- progs/infocmp.c
> +++ progs/infocmp.c   2012-03-05 11:11:08.300796156 +0000
> @@ -1089,9 +1089,10 @@ dump_initializers(TERMTYPE *term)
>  
>       if (VALID_STRING(term->Strings[n])) {
>           tp = buf;
> +#define TP_LIMIT     ((MAX_STRING - 4) - (size_t)(tp - buf))
                                       ^ (needs a testcase, I guess).
>           *tp++ = '"';
>           for (sp = term->Strings[n];
> -              *sp != 0 && (tp - buf) < MAX_STRING - 6;
> +              *sp != 0 && TP_LIMIT > 2;
>                sp++) {
>               if (isascii(UChar(*sp))
>                   && isprint(UChar(*sp))
> @@ -1099,7 +1100,7 @@ dump_initializers(TERMTYPE *term)
>                   && *sp != '"')
>                   *tp++ = *sp;
>               else {
> -                 _nc_SPRINTF(tp, _nc_SLIMIT(MAX_STRING) "\\%03o", 
> UChar(*sp));
> +                 _nc_SPRINTF(tp, _nc_SLIMIT(TP_LIMIT) "\\%03o", UChar(*sp));
>                   tp += 4;
>               }
>           }


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

Attachment: signature.asc
Description: Digital signature


reply via email to

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