Re: [fossil-dev] Bug - Fossil source "printf.c"

2017-05-21 Thread Richard Hipp
On 5/21/17, David Simmons wrote: > Location: "fossil\src\printf.c" > Section(s): (line 385) > /* Limit the precision to prevent overflowing buf[] during > conversion */ > if( precision > (etBUFSIZE-40) && (infop->flags & FLAG_STRING)==0 ){ >precision = etBUFSIZE-40; > } > >

Re: [fossil-dev] Bug - Fossil source "printf.c"

2017-05-21 Thread Stephan Beal
Just to play Devil's Advocate... On Sun, May 21, 2017 at 11:00 PM, David Simmons wrote: > // DSIM: This code has a bug where it assumes NULL '\0' > terminated bufpt > ... and now it's got TWO bugs: C++-style comments in C89 code ;). -- - stephan beal http://wanderinghorse.net/ho

Re: [fossil-dev] Bug - Fossil source "printf.c"

2017-05-21 Thread David Simmons
Addendum: Also note that the "signed/unsigned" compare possibility with etBUFSIZE being "unsigned" in "clang" makes this error worse, since expression needs to ensure precision not promoted to "unsigned". -- DSim David Simmons Sunday, May 21, 2017 2:00 PM Locati