cvs commit: hugs98/src input.c

Sigbjorn Finne sof@galois.com
Fri, 19 Jul 2002 14:56:27 -0700


Fine; done.

--sigbjorn

----- Original Message ----- 
From: "Ross Paterson" <ross@soi.city.ac.uk>
To: "Sigbjorn Finne" <sof@galois.com>
Cc: <cvs-hugs@haskell.org>
Sent: Friday, July 19, 2002 14:48
Subject: Re: cvs commit: hugs98/src input.c


> 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).