Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/epan tvbuff.c tvbuff.h

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: Sun, 12 May 2002 20:24:48 -0500 (CDT)
guy         2002/05/12 20:24:48 CDT

  Modified files:
    epan                 tvbuff.c tvbuff.h 
  Log:
  Add a "tvb_ensure_bytes_exist()", which is like "tvb_bytes_exist()" only
  it throws the appropriate exception if the bytes don't exist.  Use it in
  the GIOP and ASN.1 code to check whether the bytes to be copied to a
  buffer exist before allocating the buffer.
  
  Make "check_offset_length_no_exception()" check for an overflow, so that
  it can be used in "tvb_ensure_bytes_exist()" and do all the checking
  that the code "tvb_ensure_bytes_exist()" replaces did.
  
  Make "get_CDR_wchar()" return a "gint", so that if the length octet it
  fetched has a value between 128 and 255, the length can be returned
  correctly.
  
  Fix some comments not to specify the exception thrown by various
  routines that can throw various exceptions.
  
  Revision  Changes    Path
  1.37      +63 -5     ethereal/epan/tvbuff.c
  1.27      +7 -3      ethereal/epan/tvbuff.h