Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] WTP/WSP Patch 1

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: Tue, 29 Jul 2003 14:32:59 -0700

On Sunday, July 27, 2003, at 6:21 AM, Georg von Zezschwitz wrote:

the attached patch adds some boundary checks for
URI length in WSP packets.

A test case crashing the current CVS ethereal is attached.

I checked in a change that just adds to "add_uri()" a call

	tvb_ensure_bytes_exist(tvb, URIOffset, uriLen);

before processing the URI string, but *after* we process the URI length, so that the bogus length shows up in the protocol tree.

I didn't add the "tvb_ensure_bytes_exist()" calls in before the calls to "add_uri()" - are those calls necessary, or does the call in "add_uri()" suffice, and, if they're necessary, why doesn't the call in "add_uri()" suffice? The test case packet doesn't crash Ethereal with my change.