Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-dcerpc-nt.c

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

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Mar 2002 01:39:19 -0600 (CST)
guy         2002/03/20 01:39:19 CST

  Modified files:
    .                    packet-dcerpc-nt.c 
  Log:
  In "fake_unicode()", check to make sure we have all the data in the
  string available in the tvbuff before we allocate the buffer; this means
  that
  
  	1) we don't have to register a cleanup function to free the
  	   buffer if we throw an exception trying to fetch some of the
  	   data, because we won't even try to allocate the buffer if we
  	   don't have all the data
  
  and
  
  	2) we won't try to allocate a buffer with a bogus too-large
  	   length, as if the length is too large, we'll throw an
  	   exception in the check.
  
  Revision  Changes    Path
  1.20      +9 -12     ethereal/packet-dcerpc-nt.c