Ethereal-dev: Re: [Ethereal-dev] SoulSeek Dissector breaks MSVC build

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 12 Feb 2004 13:01:46 -0800

On Feb 12, 2004, at 4:49 AM, Kendy Kutzner wrote:

Attached is a diff to make MSVC happier.

Checked in, with a change to use "tvb_memdup()" to make a copy of the compressed data (so that, if not all the data is present, an exception is thrown before anything is allocated).

Is that copy required?  The "zlib.h" in Mac OS 10.3, at least, says

	ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
const Bytef *source, uLong sourceLen));

which suggests that the compressed data isn't modified; if so, then

	const guint8 *compr;

		...

	compr = tvb_get_ptr(tvb, offset, comprlen);

without any "g_free()"s of "compr", would suffice.