Ethereal-dev: Re: [ethereal-dev] Should we put our "snprintf()" into Wiretap?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Laurent Deniel <deniel@xxxxxxxxxxx>
Date: Sun, 20 Aug 2000 12:49:00 +0200
Guy Harris wrote:
> 
> On Sat, Aug 19, 2000 at 01:31:27PM -0500, Laurent Deniel wrote:
> > deniel      2000/08/19 13:31:25 CDT
> >
> >   Modified files:
> >     wiretap              wtap.c
> >   Log:
> >   Fix buffer overflow on zlib uncompression errors.
> 
> It fixes the buffer overflow - but there's still no check for a buffer
> overflow.

I used an hardcoded buffer length but large enough for the zlib error
messages (because snprintf was not available in wiretap ;-)
 
> There are several possibilities here:
> 
>         1) Move Ethereal's "snprintf()" implementation to Wiretap, so
>            that Wiretap, as well as everything that uses it (which, at
>            least currently, includes Ethereal, Tethereal, and editcap),
>            can use "snprintf()";

I prefer that solution since we might have to use this function in
other places in wiretap.

--
Laurent DENIEL        | E-mail: deniel@xxxxxxxxxxx
Paris, FRANCE         |         laurent.deniel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
                      | WWW   : http://www.worldnet.fr/~deniel
    All above opinions are personal, unless stated otherwise.