Ethereal-dev: Re: [Ethereal-dev] Possible problem in packet-smb-common.c [negative length tvb_

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 2 Apr 2004 19:51:42 -0800
On Wed, Mar 31, 2004 at 10:46:29AM +0200, Yaniv Kaul wrote:
> Just from reading the code, it seems there's a potential problem of 
> copying a negative sized buffer in get_unicode_or_ascii_string(), and 
> specifically, in:

Yes, that could happen; I've changed "get_unicode_or_ascii_string()" to
treat a negative length as INT_MAX (as a negative length would probably
be a large unsigned integer converted to a signed integer) and fixed
some other problems I noticed while looking at it.