Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-dcerpc.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: Fri, 9 May 2003 20:57:54 -0500 (CDT)
guy         2003/05/09 20:57:54 CDT

  Modified files:
    .                    packet-dcerpc.c 
  Log:
  Use "tvb_ensure_bytes_exist()" to cause an exception to be thrown
  *before* attempting to allocate a buffer for a string, if the copy into
  the buffer will thrown an exception; that prevents us from
  
  	1) leaking memory if we can allocate the buffer (we'd throw an
  	   exception before we freed the buffer);
  
  	2) crashing if we can't allocate the buffer because the length
  	   is bogus and large.
  
  Revision  Changes    Path
  1.119     +31 -22    ethereal/packet-dcerpc.c