cvs commit: hugs98/src input.c

Ross Paterson ross@soi.city.ac.uk
Fri, 19 Jul 2002 22:48:38 +0100


On Fri, Jul 19, 2002 at 01:24:37PM -0700, Sigbjorn Finne wrote:
> Reducing the risk of overrun bugs being introduced
> is not a bad thing.
> 
> The snprintf() you're referring to is doing the C99
> standardly thing, but there are versions of snprintf()
> that treat the 'size' argument as not including the 
> terminator (MS CRT libs is one, there's likely to be
> others too), so doing the conservative thing here
> makes good sense.

On my system (Linux with glibc 2.2.5), -F doesn't work with this patch.
The string gets set to "preprocessor Foo.h" (final 's' not copied) and
it can't find Foo.h.  If you insist on doing this, you'll need to give
a larger argument (and allocate an extra byte).